Skip to content

Commit 070aa85

Browse files
committed
Clean up
1 parent c3cb40e commit 070aa85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Identity/Extensions.Core/src/UserManagerMetrics.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@ private static string GetTokenPurpose(string purpose)
155155
// Purpose could be any value and can't be used as a tag value. However, there are known purposes
156156
// on UserManager that we can detect and use as a tag value. Some could have a ':' in them followed by user data.
157157
// We need to trim them to content before ':' and then match to known values.
158-
var trimmedPurpose = purpose;
158+
ReadOnlySpan<char> trimmedPurpose = purpose;
159159
var colonIndex = purpose.IndexOf(':');
160160
if (colonIndex >= 0)
161161
{
162-
trimmedPurpose = purpose.Substring(0, colonIndex);
162+
trimmedPurpose = purpose.AsSpan(0, colonIndex);
163163
}
164164

165165
return trimmedPurpose switch

0 commit comments

Comments
 (0)