mirror of
https://github.com/apple/swift-http-structured-headers
synced 2026-11-29 05:14:21 +00:00
Additional testing
This commit is contained in:
1 parent
49370cd8db
commit
e6e0c68caf
8 files changed
+271
-32
No files matched your search
@@ -47,7 +47,7 @@ extension KeyedInnerListDecoder: KeyedDecodingContainerProtocol {
|
||||
}
|
||||
|
||||
func decode<T>(_ type: T.Type, forKey key: Key) throws -> T where T: Decodable {
|
||||
try self.decoder.push(_StructuredHeaderCodingKey(key))
|
||||
try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy))
|
||||
defer {
|
||||
self.decoder.pop()
|
||||
}
|
||||
@@ -55,7 +55,7 @@ extension KeyedInnerListDecoder: KeyedDecodingContainerProtocol {
|
||||
}
|
||||
|
||||
func nestedContainer<NestedKey: CodingKey>(keyedBy type: NestedKey.Type, forKey key: Key) throws -> KeyedDecodingContainer<NestedKey> {
|
||||
try self.decoder.push(_StructuredHeaderCodingKey(key))
|
||||
try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy))
|
||||
defer {
|
||||
self.decoder.pop()
|
||||
}
|
||||
@@ -63,7 +63,7 @@ extension KeyedInnerListDecoder: KeyedDecodingContainerProtocol {
|
||||
}
|
||||
|
||||
func nestedUnkeyedContainer(forKey key: Key) throws -> UnkeyedDecodingContainer {
|
||||
try self.decoder.push(_StructuredHeaderCodingKey(key))
|
||||
try self.decoder.push(_StructuredHeaderCodingKey(key, keyDecodingStrategy: self.decoder.keyDecodingStrategy))
|
||||
defer {
|
||||
self.decoder.pop()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user