Skip to content

Commit a441a09

Browse files
committed
Minor refactor
1 parent a0056df commit a441a09

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/core-unit/Unit/UnitFormatting/UnitFormUtf8.Inner.Transform.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ partial class UnitFormUtf8
2828
}
2929

3030
[MethodImpl(MethodImplOptions.AggressiveInlining)]
31-
private static ReadOnlySpan<byte> InnerToSpan(byte[]? bytes)
31+
private static ReadOnlySpan<byte> InnerAsSpan(byte[]? bytes)
3232
{
3333
Debug.Assert(bytes is null || bytes.Length != default);
3434

src/core-unit/Unit/UnitFormatting/UnitFormUtf8.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
internal static partial class UnitFormUtf8
44
{
55
// General (default) form
6-
internal static ReadOnlySpan<byte> General => InnerToSpan(InnerGeneral.Value);
6+
internal static ReadOnlySpan<byte> General => InnerAsSpan(InnerGeneral.Value);
77

88
// Basic forms
9-
internal static ReadOnlySpan<byte> Canonical => InnerToSpan(InnerCanonical.Value);
10-
internal static ReadOnlySpan<byte> JsonObj => InnerToSpan(InnerJsonObj.Value);
11-
internal static ReadOnlySpan<byte> Empty => InnerToSpan(InnerEmpty.Value);
9+
internal static ReadOnlySpan<byte> Canonical => InnerAsSpan(InnerCanonical.Value);
10+
internal static ReadOnlySpan<byte> JsonObj => InnerAsSpan(InnerJsonObj.Value);
11+
internal static ReadOnlySpan<byte> Empty => InnerAsSpan(InnerEmpty.Value);
1212

1313
// Extended forms
14-
internal static ReadOnlySpan<byte> CanonicalExtended => InnerToSpan(InnerCanonicalExtended.Value);
15-
internal static ReadOnlySpan<byte> JsonObjExtended => InnerToSpan(InnerJsonObjExtended.Value);
16-
internal static ReadOnlySpan<byte> EmptyExtended => InnerToSpan(InnerEmptyExtended.Value);
14+
internal static ReadOnlySpan<byte> CanonicalExtended => InnerAsSpan(InnerCanonicalExtended.Value);
15+
internal static ReadOnlySpan<byte> JsonObjExtended => InnerAsSpan(InnerJsonObjExtended.Value);
16+
internal static ReadOnlySpan<byte> EmptyExtended => InnerAsSpan(InnerEmptyExtended.Value);
1717
}

0 commit comments

Comments
 (0)