Skip to content
This repository was archived by the owner on Aug 2, 2023. It is now read-only.

Update use of NonPortableCast to MemoryMarshal.Cast and cleanup - #2092

Merged
ahsonkhan merged 1 commit into
dotnet:masterfrom
ahsonkhan:UpdatePackage
Feb 1, 2018
Merged

Update use of NonPortableCast to MemoryMarshal.Cast and cleanup#2092
ahsonkhan merged 1 commit into
dotnet:masterfrom
ahsonkhan:UpdatePackage

Conversation

@ahsonkhan

Copy link
Copy Markdown
Contributor

Supersedes #2089

Reacting to recent API changes from dotnet/corefx#26467

cc @dotnet/corefxlab-contrib

@joshfree

Copy link
Copy Markdown
Member

I assume VS generated all the formatting changes and this wasn't done by hand? 😄

@ahsonkhan

Copy link
Copy Markdown
Contributor Author

@dotnet-bot test Innerloop OSX10.12 Release Build and Test
@dotnet-bot test Innerloop Ubuntu16.04 Debug Build and Test

@ahsonkhan

Copy link
Copy Markdown
Contributor Author

I assume VS generated all the formatting changes and this wasn't done by hand?

Yes :)

@joshfree

joshfree commented Feb 1, 2018

Copy link
Copy Markdown
Member

Also, could you create tracking issues for any intermittent test failures in CI?

Random r = new Random(42324232);
for (int i = 0; i < ints.Length; i++) { ints[i] = r.Next(); }
var bytes = ints.AsSpan().NonPortableCast<int, byte>();
var bytes = MemoryMarshal.Cast<int, byte>(ints.AsSpan());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you changing it to Cast and not to TryCast?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't TryCast before. And we don't have that yet.

@ahsonkhan
ahsonkhan merged commit d197075 into dotnet:master Feb 1, 2018
@ahsonkhan
ahsonkhan deleted the UpdatePackage branch February 1, 2018 00:47
@ahsonkhan

Copy link
Copy Markdown
Contributor Author

Also, could you create tracking issues for any intermittent test failures in CI?

The failures are coming from the already known issue: #2062

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants