Use filterMap to avoid deprecation warnings

This commit is contained in:
Max Moiseev
2017-11-08 11:13:41 -08:00
committed by Maxim Moiseev
parent fb49b3ee97
commit 8ec6c45d2d
3 changed files with 3 additions and 3 deletions

View File

@@ -1212,7 +1212,7 @@ fileprivate struct _JSONKeyedDecodingContainer<K : CodingKey> : KeyedDecodingCon
// MARK: - KeyedDecodingContainerProtocol Methods
public var allKeys: [Key] {
return self.container.keys.flatMap { Key(stringValue: $0) }
return self.container.keys.filterMap { Key(stringValue: $0) }
}
public func contains(_ key: Key) -> Bool {