Fix bunch of warnings

This commit is contained in:
David Jennes
2022-07-27 02:11:09 +02:00
parent d9a48fbda6
commit 0bbb8005bb
7 changed files with 14 additions and 15 deletions

View File

@@ -35,10 +35,8 @@ class BlockContext {
extension Collection {
func any(_ closure: (Iterator.Element) -> Bool) -> Iterator.Element? {
for element in self {
if closure(element) {
return element
}
for element in self where closure(element) {
return element
}
return nil