Browse Source

Fix two warnings.

Bart De Smet 6 years ago
parent
commit
43c78bfaf2

+ 1 - 1
Ix.NET/Source/System.Linq.Async.Queryable/System/Linq/AsyncEnumerableRewriter.cs

@@ -69,7 +69,7 @@ namespace System.Linq
                 return Expression.Call(obj, node.Method, args);
             }
 
-            var method = default(MethodInfo);
+            MethodInfo method;
 
             //
             // Find a corresponding method in the non-expression world, e.g. rewriting from

+ 2 - 0
Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderedAsyncEnumerable.cs

@@ -220,6 +220,8 @@ namespace System.Linq
             if (_source is IAsyncIListProvider<TElement> listProv)
             {
                 var count = await listProv.GetCountAsync(onlyIfCheap, cancellationToken).ConfigureAwait(false);
+
+                return count;
             }
 
             return !onlyIfCheap || _source is ICollection<TElement> || _source is ICollection ? await _source.CountAsync(cancellationToken).ConfigureAwait(false) : -1;