mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
ToHashSet optimization
This commit is contained in:
parent
853c6ad29a
commit
bd87c0c719
@ -1131,9 +1131,7 @@ namespace Wabbajack.Common
|
||||
|
||||
public static HashSet<T> ToHashSet<T>(this IEnumerable<T> coll)
|
||||
{
|
||||
var hs = new HashSet<T>();
|
||||
coll.Do(v => hs.Add(v));
|
||||
return hs;
|
||||
return new HashSet<T>(coll);
|
||||
}
|
||||
|
||||
public static HashSet<T> ToHashSet<T>(this T[] coll)
|
||||
|
Loading…
Reference in New Issue
Block a user