Skip to content

Commit c431c1a

Browse files
committed
Use correct method signature forAsSpan
1 parent d7d4d56 commit c431c1a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/LinkDotNet.StringBuilder/NaiveSearch.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static ReadOnlySpan<int> FindAll(ReadOnlySpan<char> text, ReadOnlySpan<ch
3838
}
3939
}
4040

41-
return hits.AsSpan;
41+
return hits.AsSpan();
4242
}
4343

4444
/// <summary>

src/LinkDotNet.StringBuilder/TypedSpanList.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ public TypedSpanList()
2323
count = 0;
2424
}
2525

26-
public ReadOnlySpan<T> AsSpan => buffer[..count];
26+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
27+
public ReadOnlySpan<T> AsSpan() => buffer[..count];
2728

2829
[MethodImpl(MethodImplOptions.AggressiveInlining)]
2930
public void Add(T value)

0 commit comments

Comments
 (0)