You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement proper TDD approach for union serialization with empty structures
- Use _inner only for empty structures, inner for structures with data
- Add comprehensive tests with RUSTFLAGS to verify unused variable handling
- Complete fix for issue #4308 across JSON, CBOR, and Query protocols
Copy file name to clipboardExpand all lines: codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/protocols/serialize/CborSerializerGenerator.kt
+12-3Lines changed: 12 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -547,14 +547,23 @@ class CborSerializerGenerator(
547
547
548
548
rustBlock("match input") {
549
549
for (member in context.shape.members()) {
550
+
val memberShape = model.expectShape(member.target)
551
+
val memberName = symbolProvider.toMemberName(member)
Copy file name to clipboardExpand all lines: codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/protocols/serialize/JsonSerializerGenerator.kt
+5-11Lines changed: 5 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -556,26 +556,20 @@ class JsonSerializerGenerator(
556
556
rustBlock("match input") {
557
557
for (member in context.shape.members()) {
558
558
val memberShape = model.expectShape(member.target)
Copy file name to clipboardExpand all lines: codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/protocols/serialize/QuerySerializerGenerator.kt
+5-11Lines changed: 5 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -359,26 +359,20 @@ abstract class QuerySerializerGenerator(private val codegenContext: CodegenConte
359
359
for (member in context.shape.members()) {
360
360
val memberShape = model.expectShape(member.target)
361
361
val memberName = symbolProvider.toMemberName(member)
Copy file name to clipboardExpand all lines: codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/smithy/protocols/serialize/JsonSerializerGeneratorTest.kt
+11-9Lines changed: 11 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -365,31 +365,33 @@ class JsonSerializerGeneratorTest {
365
365
val operationGenerator = jsonSerializer.operationInputSerializer(model.lookup("test#TestOp"))
Copy file name to clipboardExpand all lines: codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/smithy/protocols/serialize/QuerySerializerGeneratorTest.kt
0 commit comments