Skip to content

Commit 2e29720

Browse files
Remove unnecessary ToArray call (#44864)
1 parent ea1391a commit 2e29720

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/WebUtilities/src/BufferedReadStream.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ private static string DecodeLine(MemoryStream builder, bool foundCRLF)
413413
{
414414
// Drop the final CRLF, if any
415415
var length = foundCRLF ? builder.Length - 2 : builder.Length;
416-
return Encoding.UTF8.GetString(builder.ToArray(), 0, (int)length);
416+
return Encoding.UTF8.GetString(builder.GetBuffer(), 0, (int)length);
417417
}
418418

419419
private void CheckDisposed()

0 commit comments

Comments
 (0)