Prefer AsSpan to Substring to avoid unnecessary allocation
This commit is contained in:
parent
e8aff90582
commit
4db10e6283
|
@ -194,7 +194,6 @@ dotnet_diagnostic.CA1819.severity = suggestion
|
|||
dotnet_diagnostic.CA1822.severity = suggestion
|
||||
dotnet_diagnostic.CA1823.severity = suggestion
|
||||
dotnet_diagnostic.CA1824.severity = suggestion
|
||||
dotnet_diagnostic.CA1846.severity = suggestion
|
||||
dotnet_diagnostic.CA1847.severity = suggestion
|
||||
dotnet_diagnostic.CA2000.severity = suggestion
|
||||
dotnet_diagnostic.CA2002.severity = suggestion
|
||||
|
|
|
@ -250,7 +250,7 @@ namespace NzbDrone.Core.Datastore.Migration.Framework
|
|||
}
|
||||
|
||||
Index = end + 1;
|
||||
identifier.Append(Buffer.Substring(start, end - start));
|
||||
identifier.Append(Buffer.AsSpan(start, end - start));
|
||||
|
||||
if (Buffer[Index] != escape)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue