ToHashSet optimization

This commit is contained in:
Justin Swanson 2020-01-14 23:24:38 -06:00
parent 853c6ad29a
commit bd87c0c719

View File

@ -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)