Skip to content

Commit

Permalink
Merge pull request #771 from polyadic/use-collection-count-property
Browse files Browse the repository at this point in the history
Use collection property count access
  • Loading branch information
bash committed Nov 29, 2023
2 parents 29e4d70 + 808675e commit ceef7b5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Funcky.Async.Test/AsyncSequence/CycleRangeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public async Task CycleRangeEnumeratesUnderlyingEnumerableOnlyOnceAsync()
await using var cycleRange = AsyncSequence.CycleRange(enumerateOnce);

await cycleRange
.Take(sequence.Count() * 3)
.Take(sequence.Count * 3)
.ForEachAsync(NoOperation<string>);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public async Task GivenASequencePairWiseReturnsTheElementsPairwise()
var asyncSequence = Enumerable.Range(0, numberOfElements).ToAsyncEnumerable();

var pairs = await asyncSequence.Pairwise().ToListAsync();
Assert.Equal(numberOfElements - 1, pairs.Count());
Assert.Equal(numberOfElements - 1, pairs.Count);

foreach (var (pair, index) in pairs.Select((pair, index) => (pair, index)))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ public Property AShuffleHasTheSameElementsAsTheSource(List<int> source)

[Property]
public Property AShuffleHasTheSameLengthAsTheSource(List<int> source)
=> (source.ToAsyncEnumerable().ShuffleAsync().Result.Count() == source.Count)
=> (source.ToAsyncEnumerable().ShuffleAsync().Result.Count == source.Count)
.ToProperty();
}

0 comments on commit ceef7b5

Please sign in to comment.