Repository: smithy-lang/smithy-rs (language: rust)

Issue:
Upgrade to Smithy 1.43



Discussion / hints:

Fix patch:
diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt
index 7883b7f3e3..a51fde33bc 100644
--- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt
+++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/IntegrationTestDependencies.kt
@@ -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
@@ -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())
diff --git a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustWriter.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustWriter.kt
index 302b2ba917..8481cfadb5 100644
--- a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustWriter.kt
+++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/rustlang/RustWriter.kt
@@ -762,8 +762,18 @@ class RustWriter private constructor(
                         }
                     } else if (memberSymbol.defaultValue() is Default.NonZeroDefault) {
                         val default = Node.printJson((memberSymbol.defaultValue() as Default.NonZeroDefault).value)
-                        rustBlock("if ${variable.asValue()} != $default") {
-                            block(variable)
+                        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("") {
diff --git a/gradle.properties b/gradle.properties
index 00ae5def9c..c7db31d298 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -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


Test patch: