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

Avoid to use loop for only first element #2783

Merged
merged 1 commit into from
Jul 29, 2021
Merged

Conversation

Evangelink
Copy link
Contributor

Current code is using a foreach loop and have an unconditional throw. This causes un-necessary reading complexity.

This PR refactor the code to use FirstOrDefault instead.

@asbjornu asbjornu added this to the 5.x milestone Jul 29, 2021
@asbjornu asbjornu merged commit 893b865 into GitTools:main Jul 29, 2021
@mergify
Copy link
Contributor

mergify bot commented Jul 29, 2021

Thank you @Evangelink for your contribution!

@Evangelink Evangelink deleted the no-loop branch July 30, 2021 07:55
@arturcic arturcic modified the milestones: 5.x, 5.6.12 Aug 14, 2021
@arturcic
Copy link
Member

🎉 This issue has been resolved in version 5.7.0 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants