Loading aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt +2 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import software.amazon.smithy.rust.codegen.core.rustlang.writable import software.amazon.smithy.rust.codegen.core.smithy.generators.LibRsCustomization import software.amazon.smithy.rust.codegen.core.smithy.generators.LibRsSection import software.amazon.smithy.rust.codegen.core.testutil.testDependenciesOnly import software.amazon.smithy.rustsdk.AwsCargoDependency.awsConfig import software.amazon.smithy.rustsdk.AwsCargoDependency.awsRuntime import java.nio.file.Files import java.nio.file.Paths Loading Loading @@ -143,6 +144,7 @@ class DynamoDbTestDependencies : LibRsCustomization() { class S3TestDependencies(private val codegenContext: ClientCodegenContext) : LibRsCustomization() { override fun section(section: LibRsSection): Writable = writable { addDependency(awsConfig(codegenContext.runtimeConfig).toDevDependency().withFeature("behavior-version-latest")) addDependency(AsyncStd) addDependency(BytesUtils.toDevDependency()) addDependency(FastRand.toDevDependency()) Loading codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustWriter.kt +12 −2 Original line number Diff line number Diff line Loading @@ -762,9 +762,19 @@ class RustWriter private constructor( } } else if (memberSymbol.defaultValue() is Default.NonZeroDefault) { val default = Node.printJson((memberSymbol.defaultValue() as Default.NonZeroDefault).value) when (shape) { // We know that the default is 'true' since it's the only possible non-zero default // for a boolean. Don't explicitly check against `true` to avoid a clippy lint. is BooleanShape -> rustBlock("if !${variable.asValue()}") { block(variable) } else -> rustBlock("if ${variable.asValue()} != $default") { block(variable) } } } else { rustBlock("") { block(variable) Loading gradle.properties +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ kotlin.code.style=official # codegen smithyGradlePluginVersion=0.7.0 smithyVersion=1.42.0 smithyVersion=1.43.0 # kotlin kotlinVersion=1.9.20 Loading Loading
aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt +2 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import software.amazon.smithy.rust.codegen.core.rustlang.writable import software.amazon.smithy.rust.codegen.core.smithy.generators.LibRsCustomization import software.amazon.smithy.rust.codegen.core.smithy.generators.LibRsSection import software.amazon.smithy.rust.codegen.core.testutil.testDependenciesOnly import software.amazon.smithy.rustsdk.AwsCargoDependency.awsConfig import software.amazon.smithy.rustsdk.AwsCargoDependency.awsRuntime import java.nio.file.Files import java.nio.file.Paths Loading Loading @@ -143,6 +144,7 @@ class DynamoDbTestDependencies : LibRsCustomization() { class S3TestDependencies(private val codegenContext: ClientCodegenContext) : LibRsCustomization() { override fun section(section: LibRsSection): Writable = writable { addDependency(awsConfig(codegenContext.runtimeConfig).toDevDependency().withFeature("behavior-version-latest")) addDependency(AsyncStd) addDependency(BytesUtils.toDevDependency()) addDependency(FastRand.toDevDependency()) Loading
codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustWriter.kt +12 −2 Original line number Diff line number Diff line Loading @@ -762,9 +762,19 @@ class RustWriter private constructor( } } else if (memberSymbol.defaultValue() is Default.NonZeroDefault) { val default = Node.printJson((memberSymbol.defaultValue() as Default.NonZeroDefault).value) when (shape) { // We know that the default is 'true' since it's the only possible non-zero default // for a boolean. Don't explicitly check against `true` to avoid a clippy lint. is BooleanShape -> rustBlock("if !${variable.asValue()}") { block(variable) } else -> rustBlock("if ${variable.asValue()} != $default") { block(variable) } } } else { rustBlock("") { block(variable) Loading
gradle.properties +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ kotlin.code.style=official # codegen smithyGradlePluginVersion=0.7.0 smithyVersion=1.42.0 smithyVersion=1.43.0 # kotlin kotlinVersion=1.9.20 Loading