Skip to content

Commit b343404

Browse files
authored
Merge pull request #69336 from hamishknight/fixup
[ASTGen] NFC: Fixup formatting
2 parents a0241cd + 9da6690 commit b343404

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

lib/ASTGen/Sources/LLVMJSON/LLVMJSON.swift

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,10 @@ extension LLVMJSONDecoding.KeyedContainer: KeyedDecodingContainerProtocol {
389389
return try decode(type, forKey: key)
390390
}
391391

392-
func nestedContainer<NestedKey>(keyedBy type: NestedKey.Type, forKey key: Key) throws -> KeyedDecodingContainer<
393-
NestedKey
394-
> where NestedKey: CodingKey {
392+
func nestedContainer<NestedKey: CodingKey>(
393+
keyedBy type: NestedKey.Type,
394+
forKey key: Key
395+
) throws -> KeyedDecodingContainer<NestedKey> {
395396
var objectPtr: UnsafeMutableRawPointer? = nil
396397
if JSON_value_getAsObject(try _getValueOrThrow(forKey: key), &objectPtr) {
397398
throw _typeMismatchError(KeyedDecodingContainer<NestedKey>.self, forKey: key)
@@ -533,8 +534,9 @@ extension LLVMJSONDecoding.UnkeyedContainer: UnkeyedDecodingContainer {
533534
)
534535
}
535536

536-
mutating func nestedContainer<NestedKey>(keyedBy type: NestedKey.Type) throws -> KeyedDecodingContainer<NestedKey>
537-
where NestedKey: CodingKey {
537+
mutating func nestedContainer<NestedKey: CodingKey>(
538+
keyedBy type: NestedKey.Type
539+
) throws -> KeyedDecodingContainer<NestedKey> {
538540
var objectPtr: UnsafeMutableRawPointer? = nil
539541
let newPath = codingPath + [IndexKey(intValue: currentIndex)]
540542
if JSON_value_getAsObject(try _getValueOrThrow(), &objectPtr) {
@@ -672,9 +674,10 @@ extension LLVMJSONEncoding.KeyedContainer: KeyedEncodingContainerProtocol {
672674
try value.encode(to: encoder)
673675
}
674676

675-
mutating func nestedContainer<NestedKey>(keyedBy keyType: NestedKey.Type, forKey key: Key) -> KeyedEncodingContainer<
676-
NestedKey
677-
> where NestedKey: CodingKey {
677+
mutating func nestedContainer<NestedKey: CodingKey>(
678+
keyedBy keyType: NestedKey.Type,
679+
forKey key: Key
680+
) -> KeyedEncodingContainer<NestedKey> {
678681
let nestedObjectPtr = JSON_object_setNewObject(objectPtr, key.stringValue)
679682
return KeyedEncodingContainer(KeyedContainer(objectPtr: nestedObjectPtr, codingPath: codingPath + [key]))
680683
}

0 commit comments

Comments
 (0)