mirror of
https://github.com/apple/swift-http-structured-headers
synced 2026-11-25 04:47:48 +00:00
Apply formatting
This commit is contained in:
1 parent
89ef2cf73d
commit
3f73125a0d
28 files changed
+198
-184
No files matched your search
@@ -32,20 +32,20 @@ struct KeyedItemDecoder<Key: CodingKey, BaseData: RandomAccessCollection> where
|
||||
|
||||
extension KeyedItemDecoder: KeyedDecodingContainerProtocol {
|
||||
var codingPath: [CodingKey] {
|
||||
return self.decoder.codingPath
|
||||
self.decoder.codingPath
|
||||
}
|
||||
|
||||
var allKeys: [Key] {
|
||||
return keyedItemDecoderSupportedKeys.compactMap { Key(stringValue: $0) }
|
||||
keyedItemDecoderSupportedKeys.compactMap { Key(stringValue: $0) }
|
||||
}
|
||||
|
||||
func contains(_ key: Key) -> Bool {
|
||||
return keyedItemDecoderSupportedKeys.contains(key.stringValue)
|
||||
keyedItemDecoderSupportedKeys.contains(key.stringValue)
|
||||
}
|
||||
|
||||
func decodeNil(forKey key: Key) throws -> Bool {
|
||||
// Keys are never nil for this type.
|
||||
return false
|
||||
false
|
||||
}
|
||||
|
||||
func decode<T>(_ type: T.Type, forKey key: Key) throws -> T where T: Decodable {
|
||||
|
||||
Reference in new issue
Block a user