mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-10 03:05:42 +00:00
Directly return SpanSplitEnumerator instance
This commit is contained in:
parent
c9e473e86f
commit
f0781e5564
@ -64,7 +64,7 @@ public static class SpanExtensions
|
||||
public static SpanSplitEnumerator<T> Split<T>(this in Span<T> source, T delimiter)
|
||||
where T : struct, IEquatable<T>
|
||||
{
|
||||
return source.AsReadOnly().Split(delimiter);
|
||||
return new SpanSplitEnumerator<T>(source, delimiter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -94,7 +94,7 @@ public static class SpanExtensions
|
||||
public static SpanSplitEnumerator<T> Split<T>(this in Span<T> source, in ReadOnlySpan<T> delimiter)
|
||||
where T : struct, IEquatable<T>
|
||||
{
|
||||
return source.AsReadOnly().Split(delimiter);
|
||||
return new SpanSplitEnumerator<T>(source, delimiter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user