Skip to content

Commit 8db27ae

Browse files
Updated ComputeContentHashCode implementation.
1 parent 10ba1a0 commit 8db27ae

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

OnixLabs.Core/Linq/IEnumerableExtensions.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,7 @@ public static bool AnyEqualBy<TElement, TProperty>(
9292
/// <returns>Returns the computed content hash code of this <see cref="IEnumerable{T}"/>.</returns>
9393
public static int ComputeContentHashCode<T>(this IEnumerable<T> enumerable)
9494
{
95-
HashCode hashCode = new();
96-
97-
enumerable.ForEach(element => hashCode.Add(element));
98-
99-
return hashCode.ToHashCode();
95+
return new HashCode().AddItems(enumerable).ToHashCode();
10096
}
10197

10298
/// <summary>

0 commit comments

Comments
 (0)