Skip to content

Commit 70fa84f

Browse files
apply pre-commit
add features to aws-smithy-types
1 parent bf7333d commit 70fa84f

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/client/FluentClientGenerator.kt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -358,20 +358,20 @@ class FluentClientGenerator(
358358
if (inputBuilderType.toString().endsWith("Builder")) {
359359
rustTemplate(
360360
"""
361-
##[#{AwsSdkUnstableAttribute}]
362-
/// This function replaces the parameter with new one.
363-
/// It is useful when you want to replace the existing data with de-serialized data.
364-
/// ```compile_fail
365-
/// let result_future = async {
366-
/// let deserialized_parameters: $inputBuilderType = serde_json::from_str(&json_string).unwrap();
367-
/// client.$fnName().set_fields(&deserialized_parameters).send().await
368-
/// };
369-
/// ```
370-
pub fn set_fields(mut self, data: $inputBuilderType) -> Self {
371-
self.inner = data;
372-
self
373-
}
374-
""",
361+
##[#{AwsSdkUnstableAttribute}]
362+
/// This function replaces the parameter with new one.
363+
/// It is useful when you want to replace the existing data with de-serialized data.
364+
/// ```compile_fail
365+
/// let result_future = async {
366+
/// let deserialized_parameters: $inputBuilderType = serde_json::from_str(&json_string).unwrap();
367+
/// client.$fnName().set_fields(&deserialized_parameters).send().await
368+
/// };
369+
/// ```
370+
pub fn set_fields(mut self, data: $inputBuilderType) -> Self {
371+
self.inner = data;
372+
self
373+
}
374+
""",
375375
"AwsSdkUnstableAttribute" to Attribute.AwsSdkUnstableAttribute.inner,
376376
)
377377
}

rust-runtime/aws-smithy-types/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ base64-simd = "0.8"
1818
[target."cfg(aws_sdk_unstable)".dependencies.serde]
1919
version = "1"
2020
features = ["derive"]
21+
optional = true
2122

2223
[dev-dependencies]
2324
base64 = "0.13.0"
@@ -37,3 +38,7 @@ rustdoc-args = ["--cfg", "docsrs"]
3738
[[bench]]
3839
name = "base64"
3940
harness = false
41+
42+
[features]
43+
serde-serialize = []
44+
serde-deserialize = []

0 commit comments

Comments
 (0)