1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

toml, semver: minor optimization of conditions (#18299)

This commit is contained in:
Turiiya
2023-05-30 14:24:27 +02:00
committed by GitHub
parent 0b71cef78a
commit af05cfcbbc
2 changed files with 10 additions and 9 deletions

View File

@ -34,7 +34,7 @@ struct InvalidComparatorFormatError {
}
fn (r Range) satisfies(ver Version) bool {
return true in r.comparator_sets.map(it.satisfies(ver))
return r.comparator_sets.any(it.satisfies(ver))
}
fn (set ComparatorSet) satisfies(ver Version) bool {