Skip to content

Commit 9f7d1f2

Browse files
refactor: remove unneeded clone
1 parent acd9486 commit 9f7d1f2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Diff for: src/types.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -962,22 +962,21 @@ fn join_bounds_inner(
962962
joiner
963963
};
964964

965-
let (trailing_str, extendable) = if i == 0 {
965+
let (extendable, trailing_str) = if i == 0 {
966966
let bound_str = item.rewrite(context, shape)?;
967-
let bound_str_clone = bound_str.clone();
968-
(bound_str, is_bound_extendable(&bound_str_clone, item))
967+
(is_bound_extendable(&bound_str, item), bound_str)
969968
} else {
970969
let bound_str = &item.rewrite(context, shape)?;
971970
match leading_span {
972971
Some(ls) if has_leading_comment => (
972+
is_bound_extendable(bound_str, item),
973973
combine_strs_with_missing_comments(
974974
context, joiner, bound_str, ls, shape, true,
975975
)?,
976-
is_bound_extendable(bound_str, item),
977976
),
978977
_ => (
979-
String::from(joiner) + bound_str,
980978
is_bound_extendable(bound_str, item),
979+
String::from(joiner) + bound_str,
981980
),
982981
}
983982
};

0 commit comments

Comments
 (0)