From 6c959cfe0e80125cf2e0d88f6ae2537372bfdbac Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Thu, 1 Dec 2022 11:17:29 -0500 Subject: [PATCH] CR feedback II --- .../client/smithy/endpoint/ClientContextParamDecorator.kt | 2 +- .../software/amazon/smithy/rust/codegen/core/testutil/Rust.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/endpoint/ClientContextParamDecorator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/endpoint/ClientContextParamDecorator.kt index 95cd14be26..b5957deda2 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/endpoint/ClientContextParamDecorator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/endpoint/ClientContextParamDecorator.kt @@ -89,7 +89,7 @@ internal class ClientContextDecorator(ctx: CodegenContext) : ConfigCustomization docsOrFallback(param.docs) rust( """ - pub fn set_${param.name}(mut self, ${param.name}: Option<#T>) -> Self { + pub fn set_${param.name}(&mut self, ${param.name}: Option<#T>) -> &mut Self { self.${param.name} = ${param.name}; self } diff --git a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/Rust.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/Rust.kt index 17b71989f8..b3e1152c9c 100644 --- a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/Rust.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/Rust.kt @@ -87,7 +87,8 @@ object TestWorkspace { ) newProject.resolve("rust-toolchain.toml").writeText( // help rust select the right version when we run cargo test - // TODO(cleanup): load this from the msrv property using a method like we do for runtime crate versions + // TODO(https://github.com/awslabs/smithy-rs/issues/2048): load this from the msrv property using a + // method as we do for runtime crate versions "[toolchain]\nchannel = \"1.62.1\"\n", ) // ensure there at least an empty lib.rs file to avoid broken crates