Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

benmccallum
Copy link
Contributor

Probably no need to instantiate the regex if the value being null never means it gets executed.

Probably no need to instantiate the regex if the value being null never means it gets executed.
@benmccallum
Copy link
Contributor Author

Was just digging around with .NET 7's GeneratedRegex attribute and it's possible with the Func<T, Regex> overload to call the generated regex property which is pretty cool, but thought I'd point out a potential optimization here.

@JeremySkinner
Copy link
Member

hi @benmccallum thanks for this, although it doesn't build at the moment. Could you add in this missing semicolon then I'll get this merged. Thanks!

@benmccallum
Copy link
Contributor Author

Ha, I swear 99% of the time I edit a file for something small like this online in GitHub I miss something and it doesn't build πŸ˜†

🀞🏻 it's ok now. and no worries :)

@JeremySkinner JeremySkinner merged commit 514d853 into FluentValidation:main Jan 11, 2023
@JeremySkinner
Copy link
Member

Thanks!

@benmccallum benmccallum deleted the patch-1 branch January 12, 2023 23:48
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.

2 participants