Use first(where:) instead of filter().first
This commit is contained in:
6 files changed
+11
-14
No files matched your search
@@ -81,7 +81,7 @@ final class PresetManager {
|
||||
}
|
||||
|
||||
func item(name: String) -> Preset? {
|
||||
return presets.filter { $0.title == name }.first
|
||||
return presets.first { $0.title == name }
|
||||
}
|
||||
|
||||
private func sort() {
|
||||
|
||||
Reference in new issue
Block a user