* Update uses of AsBytes to use MemoryMarshal.AsBytes
* Cleanup commented out code
* Remove AsBytes from MemoryExtensions Portable
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
int charsWritten = source.AsSpan().ToUpperInvariant(span);
// Slice the array to the size returned by ToUpperInvariant.
- int hash = Marvin.ComputeHash32(span.Slice(0, charsWritten).AsBytes(), Marvin.DefaultSeed);
+ int hash = Marvin.ComputeHash32(MemoryMarshal.AsBytes(span.Slice(0, charsWritten)), Marvin.DefaultSeed);
// Return the borrowed array if necessary.
if (borrowedArr != null)