Skip to content

Commit 1b48382

Browse files
authored
Merge pull request #558 from asomers/clone_from
Clippy: fix a assigning_clones lint
2 parents d4477ad + 2e5af8f commit 1b48382

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mockall_derive/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ fn merge_generics(x: &Generics, y: &Generics) -> Generics {
10411041
ot.colon_token = ot.colon_token.or(yt.colon_token);
10421042
ot.eq_token = ot.eq_token.or(yt.eq_token);
10431043
if ot.default.is_none() {
1044-
ot.default = yt.default.clone();
1044+
ot.default.clone_from(&yt.default);
10451045
}
10461046
// XXX this might result in duplicate bounds
10471047
if ot.bounds != yt.bounds {

0 commit comments

Comments
 (0)