diff --git a/benchmarkapps/PlatformBenchmarks/DateHeader.cs b/benchmarkapps/PlatformBenchmarks/DateHeader.cs index 1d03d78b53..5cfbc5c3b2 100644 --- a/benchmarkapps/PlatformBenchmarks/DateHeader.cs +++ b/benchmarkapps/PlatformBenchmarks/DateHeader.cs @@ -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"); }