diff --git a/codegen-serde/src/main/kotlin/software/amazon/smithy/rust/codegen/serde/SerializeImplGenerator.kt b/codegen-serde/src/main/kotlin/software/amazon/smithy/rust/codegen/serde/SerializeImplGenerator.kt index 66b806cdbaed0999d20d24331dce0222639bc4f7..1ef9a3033ef93321828b8c6930779930615d87a1 100644 --- a/codegen-serde/src/main/kotlin/software/amazon/smithy/rust/codegen/serde/SerializeImplGenerator.kt +++ b/codegen-serde/src/main/kotlin/software/amazon/smithy/rust/codegen/serde/SerializeImplGenerator.kt @@ -556,6 +556,7 @@ class SerializeImplGenerator(private val codegenContext: CodegenContext) { } """, "Shape" to shape, "body" to block, *SupportStructures.codegenScope, + *RuntimeType.preludeScope, ) } @@ -578,6 +579,7 @@ class SerializeImplGenerator(private val codegenContext: CodegenContext) { } """, "Shape" to shape, "body" to block, *SupportStructures.codegenScope, + *RuntimeType.preludeScope, ) } } diff --git a/codegen-serde/src/main/kotlin/software/amazon/smithy/rust/codegen/serde/SupportStructures.kt b/codegen-serde/src/main/kotlin/software/amazon/smithy/rust/codegen/serde/SupportStructures.kt index 724e7fd8fb2f43b69f266c535d9705c715425ac8..03c4a18fe74c5834b5352631c7c3375c2dc3bf7c 100644 --- a/codegen-serde/src/main/kotlin/software/amazon/smithy/rust/codegen/serde/SupportStructures.kt +++ b/codegen-serde/src/main/kotlin/software/amazon/smithy/rust/codegen/serde/SupportStructures.kt @@ -23,7 +23,6 @@ object SupportStructures { val codegenScope = arrayOf( - *RuntimeType.preludeScope, "ConfigurableSerde" to configurableSerde(), "SerializeConfigured" to serializeConfigured(), "ConfigurableSerdeRef" to configurableSerdeRef(), @@ -54,7 +53,7 @@ object SupportStructures { "serde" to serde, "SerializeConfigured" to serializeConfigured(), "SerializationSettings" to serializationSettings(), - *codegenScope, + *RuntimeType.preludeScope, ) } @@ -78,7 +77,7 @@ object SupportStructures { "serde" to serde, "SerializeConfigured" to serializeConfigured(), "SerializationSettings" to serializationSettings(), - *codegenScope, + *RuntimeType.preludeScope, ) } @@ -150,7 +149,7 @@ object SupportStructures { } """, "serde" to CargoDependency.Serde.toType(), - *codegenScope, + *RuntimeType.preludeScope, ) } @@ -196,7 +195,7 @@ object SupportStructures { "ConfigurableSerdeRef" to configurableSerdeRef(), "SerializeConfigured" to serializeConfigured(), "serde" to CargoDependency.Serde.toType(), - *codegenScope, + *RuntimeType.preludeScope, ) }