Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some minor cleanup #906

Merged
merged 1 commit into from
May 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,11 @@ public ValueTask<int> GetCountAsync(bool onlyIfCheap, CancellationToken cancella

return Core(cancellationToken);

async ValueTask<int> Core(CancellationToken _cancellationToken)
async ValueTask<int> 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
{
Expand Down Expand Up @@ -503,11 +503,11 @@ public ValueTask<int> GetCountAsync(bool onlyIfCheap, CancellationToken cancella

return Core(cancellationToken);

async ValueTask<int> Core(CancellationToken _cancellationToken)
async ValueTask<int> 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);

Expand Down Expand Up @@ -645,13 +645,13 @@ public ValueTask<int> GetCountAsync(bool onlyIfCheap, CancellationToken cancella

return Core(cancellationToken);

async ValueTask<int> Core(CancellationToken _cancellationToken)
async ValueTask<int> 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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ public static ValueTask<bool> SequenceEqualAsync<TSource>(this IAsyncEnumerable<
if (second == null)
throw Error.ArgumentNull(nameof(second));

if (comparer == null)
{
comparer = EqualityComparer<TSource>.Default;
}
comparer ??= EqualityComparer<TSource>.Default;

if (first is ICollection<TSource> firstCol && second is ICollection<TSource> secondCol)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down