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

Add TrySingle overloads for #643

Merged

Conversation

elianora
Copy link
Contributor

@elianora elianora commented Apr 1, 2024

Addresses #631 by adding and unit testing the following:

public static TSource? TrySingle<TSource>(this IEnumerable<TSource> source);
public static ValueTask<TSource?> TrySingle<TSource>(this IAsyncEnumerable<TSource> source, CancellationToken cancellationToken = default)

Copy link
Owner

@viceroypenguin viceroypenguin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nit. Looks great though! Thank you!

@viceroypenguin
Copy link
Owner

Build errors aren't your fault. I'm gonna fix those real quick and then I'll rebuild your PR.

Copy link

codecov bot commented Apr 1, 2024

Codecov Report

Attention: Patch coverage is 96.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 95.28%. Comparing base (f5001c2) to head (28789df).

Files Patch % Lines
Source/SuperLinq.Async/TrySingle.cs 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #643   +/-   ##
=======================================
  Coverage   95.28%   95.28%           
=======================================
  Files         248      248           
  Lines        8701     8726   +25     
  Branches     1609     1615    +6     
=======================================
+ Hits         8291     8315   +24     
  Misses        218      218           
- Partials      192      193    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@viceroypenguin viceroypenguin merged commit 636e2d0 into viceroypenguin:master Apr 1, 2024
4 checks passed
@viceroypenguin viceroypenguin linked an issue Apr 1, 2024 that may be closed by this pull request
@elianora elianora deleted the feature/try-single-overload branch April 1, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a simpler TrySingle overload
2 participants