Ver Fonte

Reduce code duplication in Distinct.

Bart De Smet há 6 anos atrás
pai
commit
b2cc797263

+ 1 - 7
Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Distinct.cs

@@ -11,13 +11,7 @@ namespace System.Linq
 {
     public static partial class AsyncEnumerable
     {
-        public static IAsyncEnumerable<TSource> Distinct<TSource>(this IAsyncEnumerable<TSource> source)
-        {
-            if (source == null)
-                throw Error.ArgumentNull(nameof(source));
-
-            return new DistinctAsyncIterator<TSource>(source, comparer: null);
-        }
+        public static IAsyncEnumerable<TSource> Distinct<TSource>(this IAsyncEnumerable<TSource> source) => Distinct(source, comparer: null);
 
         public static IAsyncEnumerable<TSource> Distinct<TSource>(this IAsyncEnumerable<TSource> source, IEqualityComparer<TSource> comparer)
         {