From d57da6b71f88665ba09f3599413b5c05895c8c61 Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Thu, 12 Apr 2018 23:33:47 -0700 Subject: [PATCH] Collapse AsSpan().Slice(..) into AsSpan(..) (#2491) --- benchmarkapps/PlatformBenchmarks/DateHeader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); }