diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-19 18:01:34 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-19 18:01:34 +0000 |
commit | 0392e63c95736e988bda0fc62261ef48e89b3a31 (patch) | |
tree | 2610d8b9e73e08e6d9f77ddb65147e8ed38e4cd5 /crates/ide_assists | |
parent | b54e4b87e80a2a9d042c7c9f82abea97a8263f34 (diff) | |
parent | ba72308588e50b7e8a514b7b83946e5ec3cf2e96 (diff) |
Merge #8110
8110: simplify r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide_assists')
-rw-r--r-- | crates/ide_assists/src/handlers/move_bounds.rs | 6 |
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)] |