mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Use filterMap to avoid deprecation warnings
This commit is contained in:
committed by
Maxim Moiseev
parent
fb49b3ee97
commit
8ec6c45d2d
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user