Skip to content

Commit 30a0c44

Browse files
committed
Optimize EquatableArray<T>.Equals
1 parent f4fd71a commit 30a0c44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CommunityToolkit.Mvvm.SourceGenerators/Helpers/EquatableArray{T}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public bool IsEmpty
7474
/// <sinheritdoc/>
7575
public bool Equals(EquatableArray<T> array)
7676
{
77-
return AsImmutableArray().SequenceEqual(array.AsImmutableArray());
77+
return AsSpan().SequenceEqual(array.AsSpan());
7878
}
7979

8080
/// <sinheritdoc/>

0 commit comments

Comments
 (0)