Skip to content

Commit 0392e63

Browse files
bors[bot]matklad
andauthored
Merge #8110
8110: simplify r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
2 parents b54e4b8 + ba72308 commit 0392e63

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/ide_assists/src/handlers/move_bounds.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ pub(crate) fn move_bounds_to_where_clause(acc: &mut Assists, ctx: &AssistContext
5050

5151
for type_param in type_param_list.type_params() {
5252
if let Some(tbl) = type_param.type_bound_list() {
53-
if let Some(predicate) = build_predicate(type_param.clone()) {
54-
where_clause.add_predicate(predicate.clone_for_update())
53+
if let Some(predicate) = build_predicate(type_param) {
54+
where_clause.add_predicate(predicate)
5555
}
5656
tbl.remove()
5757
}
@@ -69,7 +69,7 @@ fn build_predicate(param: ast::TypeParam) -> Option<ast::WherePred> {
6969
make::path_unqualified(segment)
7070
};
7171
let predicate = make::where_pred(path, param.type_bound_list()?.bounds());
72-
Some(predicate)
72+
Some(predicate.clone_for_update())
7373
}
7474

7575
#[cfg(test)]

0 commit comments

Comments
 (0)