Remove extraneous call to GetMemory in BufferWriter (#7354)

The BufferWriter called GetMemory(count) and dropped the result, only to then call GetSpan(). This moves the count argument to GetSpan, and drops the call to GetMemory.
This commit is contained in:
Andrew Arnott 2019-02-07 15:31:33 -08:00 committed by Pavel Krymets
parent 68579d1c11
commit 21177671b6
1 changed files with 1 additions and 2 deletions

View File

@ -73,8 +73,7 @@ namespace System.Buffers
Commit();
}
_output.GetMemory(count);
_span = _output.GetSpan();
_span = _output.GetSpan(count);
}
private void WriteMultiBuffer(ReadOnlySpan<byte> source)