mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-03-05 13:20:20 -05:00
Prefer AsSpan to Substring to avoid unnecessary allocation
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user