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

Collection range indices #94

Merged
merged 5 commits into from
Oct 9, 2023
Merged

Conversation

feO2x
Copy link
Owner

@feO2x feO2x commented Oct 3, 2023

closes #93

In addition to the new Range.For overloads, I also fixed the tests that break in newer .NET versions (because of enums being extended and Enumerable.Range no longer being lazily evaluated).

Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
I optimized the new GetCount method so that it also supports IReadOnlyCollection<T> and ICollection<T> properly. It's now faster in .NET 7 than the LINQ Count method on Windows and Linux.

Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
@feO2x
Copy link
Owner Author

feO2x commented Oct 8, 2023

@reima if you want to, we can merge this PR

@reima
Copy link

reima commented Oct 8, 2023

@feO2x Yes, let's merge it! Thank you for your efforts and gathering my feedback along the way. I appreciate it.

Signed-off-by: Kenny Pflug <kenny.pflug@live.de>
@feO2x feO2x merged commit 74b8cab into dev Oct 9, 2023
1 check passed
@feO2x feO2x deleted the features/93-collection-range-indices branch October 9, 2023 05:38
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.

Proposal: construct Range of valid indices for strings and collections
2 participants