Too much future: firstIndex is not available on Xcode 9.4-

This commit is contained in:
Gwendal Roué committed 2019-03-07 05:06:58 +01:00
1 parent d566838dc5
commit b063870739
1 file changed
+1 -1
+1 -1
View File
@@ -73,7 +73,7 @@ struct OrderedDictionary<Key: Hashable, Value> {
guard let value = dictionary.removeValue(forKey: key) else {
return nil
}
let index = keys.firstIndex { $0 == key }!
let index = keys.index { $0 == key }!
keys.remove(at: index)
return value
}