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

Replace the single-iteration foreach loops #60

Closed
scottdorman opened this issue Sep 27, 2020 · 0 comments · Fixed by #61
Closed

Replace the single-iteration foreach loops #60

scottdorman opened this issue Sep 27, 2020 · 0 comments · Fixed by #61
Assignees

Comments

@scottdorman
Copy link
Contributor

The single-iteration foreach loops in Requires.NotNullOrEmpty(IEnumerable values, string? parameterName) and Requires.NotNullOrEmpty<T>(IEnumerable<T> values, string? parameterName) can be replaced by a direct call to GetEnumerator().MoveNext(). This results in a slight performance boost and fewer IL instructions generated.

scottdorman added a commit to scottdorman/vs-validation that referenced this issue Sep 28, 2020
Replaces the single-iteration foreach loops. Also adds `dotnet_separate_import_directive_groups = false` to .editorconfig.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants