Collapse AsSpan().Slice(..) into AsSpan(..) (#2491)
This commit is contained in:
parent
10f3b6863e
commit
d57da6b71f
|
|
@ -45,7 +45,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
|
|||
{
|
||||
lock (s_headerBytesScratch)
|
||||
{
|
||||
if (!Utf8Formatter.TryFormat(value, s_headerBytesScratch.AsSpan().Slice(prefixLength), out int written, 'R'))
|
||||
if (!Utf8Formatter.TryFormat(value, s_headerBytesScratch.AsSpan(prefixLength), out int written, 'R'))
|
||||
{
|
||||
throw new Exception("date time format failed");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue