Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Nugine committed Mar 9, 2024
1 parent b34aac2 commit babb1be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codegen/src/dto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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());
Expand Down

0 comments on commit babb1be

Please sign in to comment.