aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-03-19 18:00:20 +0000
committerAleksey Kladov <[email protected]>2021-03-19 18:00:20 +0000
commitba72308588e50b7e8a514b7b83946e5ec3cf2e96 (patch)
treed89117cd0c0cc7f79482086881b11d5eee6973c3
parenta61691026a169a17f62de9de6ebab197faa7c703 (diff)
simplify
changelog skip
-rw-r--r--crates/ide_assists/src/handlers/move_bounds.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ide_assists/src/handlers/move_bounds.rs b/crates/ide_assists/src/handlers/move_bounds.rs
index 9ad0c9816..b5dec8014 100644
--- a/crates/ide_assists/src/handlers/move_bounds.rs
+++ b/crates/ide_assists/src/handlers/move_bounds.rs
@@ -50,8 +50,8 @@ pub(crate) fn move_bounds_to_where_clause(acc: &mut Assists, ctx: &AssistContext
50 50
51 for type_param in type_param_list.type_params() { 51 for type_param in type_param_list.type_params() {
52 if let Some(tbl) = type_param.type_bound_list() { 52 if let Some(tbl) = type_param.type_bound_list() {
53 if let Some(predicate) = build_predicate(type_param.clone()) { 53 if let Some(predicate) = build_predicate(type_param) {
54 where_clause.add_predicate(predicate.clone_for_update()) 54 where_clause.add_predicate(predicate)
55 } 55 }
56 tbl.remove() 56 tbl.remove()
57 } 57 }
@@ -69,7 +69,7 @@ fn build_predicate(param: ast::TypeParam) -> Option<ast::WherePred> {
69 make::path_unqualified(segment) 69 make::path_unqualified(segment)
70 }; 70 };
71 let predicate = make::where_pred(path, param.type_bound_list()?.bounds()); 71 let predicate = make::where_pred(path, param.type_bound_list()?.bounds());
72 Some(predicate) 72 Some(predicate.clone_for_update())
73} 73}
74 74
75#[cfg(test)] 75#[cfg(test)]