Skip to content

Commit 0cc6550

Browse files
traviscrosstmandry
authored andcommitted
Remove redundant uses of clone
Tokens in `syn` are `Copy`, so we don't need to clone them. Let's remove the calls to `clone`.
1 parent ee9bd43 commit 0cc6550

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

trait_transformer/src/variant.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ fn transform_item(item: &TraitItem, bounds: &Vec<TypeParamBound>) -> TraitItem {
126126
ReturnType::Type(arrow, ty) => match &**ty {
127127
Type::ImplTrait(it) => {
128128
let ty = Type::ImplTrait(TypeImplTrait {
129-
impl_token: it.impl_token.clone(),
129+
impl_token: it.impl_token,
130130
bounds: it.bounds.iter().chain(bounds).cloned().collect(),
131131
});
132-
(arrow.clone(), ty)
132+
(*arrow, ty)
133133
}
134134
_ => return item.clone(),
135135
},

0 commit comments

Comments
 (0)