From babb1bec1831d74b914cfd460d66c5b3687086d6 Mon Sep 17 00:00:00 2001 From: Nugine Date: Sat, 9 Mar 2024 09:44:48 +0800 Subject: [PATCH] fix lints --- codegen/src/dto.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codegen/src/dto.rs b/codegen/src/dto.rs index 452a9f51..0ee8fd28 100644 --- a/codegen/src/dto.rs +++ b/codegen/src/dto.rs @@ -308,7 +308,7 @@ fn unify_operation_types(ops: &Operations, space: &mut RustTypes) { } else { assert!(op.smithy_input.ends_with("Request")); let Some(rust::Type::Struct(mut ty)) = space.remove(&op.smithy_input) else { panic!() }; - ty.name = op.input.clone(); // rename type + ty.name.clone_from(&op.input); // rename type ty }; assert!(space.insert(op.input.clone(), rust::Type::Struct(input_ty)).is_none()); @@ -329,7 +329,7 @@ fn unify_operation_types(ops: &Operations, space: &mut RustTypes) { continue; } let rust::Type::Struct(mut ty) = space[&op.smithy_output].clone() else { panic!() }; - ty.name = op.output.clone(); // duplicate type + ty.name.clone_from(&op.output); // duplicate type ty }; assert!(space.insert(op.output.clone(), rust::Type::Struct(output_ty)).is_none());