diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Intersect.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Intersect.cs index 4606644f4d..52a0c14d81 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Intersect.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Intersect.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; -using System.Diagnostics; using System.Threading; using System.Threading.Tasks; diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Join.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Join.cs index f1a5b6d568..48bdc890d6 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Join.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Join.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; -using System.Diagnostics; using System.Threading; using System.Threading.Tasks; diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs index 5e6c9ecab7..d357efa945 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs @@ -364,11 +364,11 @@ public ValueTask GetCountAsync(bool onlyIfCheap, CancellationToken cancella return Core(cancellationToken); - async ValueTask Core(CancellationToken _cancellationToken) + async ValueTask Core(CancellationToken cancellationToken) { var count = 0; - await foreach (var element in _source.WithCancellation(_cancellationToken).ConfigureAwait(false)) + await foreach (var element in _source.WithCancellation(cancellationToken).ConfigureAwait(false)) { checked { @@ -503,11 +503,11 @@ public ValueTask GetCountAsync(bool onlyIfCheap, CancellationToken cancella return Core(cancellationToken); - async ValueTask Core(CancellationToken _cancellationToken) + async ValueTask Core(CancellationToken cancellationToken) { var count = 0; - await foreach (var element in _source.WithCancellation(_cancellationToken).ConfigureAwait(false)) + await foreach (var element in _source.WithCancellation(cancellationToken).ConfigureAwait(false)) { var items = await _selector(element).ConfigureAwait(false); @@ -645,13 +645,13 @@ public ValueTask GetCountAsync(bool onlyIfCheap, CancellationToken cancella return Core(cancellationToken); - async ValueTask Core(CancellationToken _cancellationToken) + async ValueTask Core(CancellationToken cancellationToken) { var count = 0; - await foreach (var element in _source.WithCancellation(_cancellationToken).ConfigureAwait(false)) + await foreach (var element in _source.WithCancellation(cancellationToken).ConfigureAwait(false)) { - var items = await _selector(element, _cancellationToken).ConfigureAwait(false); + var items = await _selector(element, cancellationToken).ConfigureAwait(false); checked { diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SequenceEqual.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SequenceEqual.cs index 089df17600..094b71da8a 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SequenceEqual.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SequenceEqual.cs @@ -20,10 +20,7 @@ public static ValueTask SequenceEqualAsync(this IAsyncEnumerable< if (second == null) throw Error.ArgumentNull(nameof(second)); - if (comparer == null) - { - comparer = EqualityComparer.Default; - } + comparer ??= EqualityComparer.Default; if (first is ICollection firstCol && second is ICollection secondCol) { diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipWhile.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipWhile.cs index 0a624aa1dd..bb1b912ee8 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipWhile.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipWhile.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; -using System.Diagnostics; using System.Threading; using System.Threading.Tasks; diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeWhile.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeWhile.cs index 8c94b884e1..56c1161034 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeWhile.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeWhile.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; -using System.Diagnostics; using System.Threading; using System.Threading.Tasks;