diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-10-14 10:44:04 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-10-14 10:44:04 +0100 |
commit | 691bc276862c83cb6ccb2db08c4c903863de8a94 (patch) | |
tree | 90e4457b5e251c26252aa72d33835eba9a8a089c /crates/ra_assists/src/assists | |
parent | 85361e8d507cf608001447a5ce2c4b6cd3f22535 (diff) | |
parent | 53d1673edc13512423fa5236908a85102324c26a (diff) |
Merge #1999
1999: Simplify find().is_some() to any() r=matklad a=kjeremy
Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/assists')
-rw-r--r-- | crates/ra_assists/src/assists/move_bounds.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/assists/move_bounds.rs b/crates/ra_assists/src/assists/move_bounds.rs index f791d22b0..d2444b6b9 100644 --- a/crates/ra_assists/src/assists/move_bounds.rs +++ b/crates/ra_assists/src/assists/move_bounds.rs | |||
@@ -18,7 +18,7 @@ pub(crate) fn move_bounds_to_where_clause(mut ctx: AssistCtx<impl HirDatabase>) | |||
18 | } | 18 | } |
19 | 19 | ||
20 | let parent = type_param_list.syntax().parent()?; | 20 | let parent = type_param_list.syntax().parent()?; |
21 | if parent.children_with_tokens().find(|it| it.kind() == WHERE_CLAUSE).is_some() { | 21 | if parent.children_with_tokens().any(|it| it.kind() == WHERE_CLAUSE) { |
22 | return None; | 22 | return None; |
23 | } | 23 | } |
24 | 24 | ||