1999: Simplify find().is_some() to any() r=matklad a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
This commit is contained in:
bors[bot] 2019-10-14 09:44:04 +00:00 committed by GitHub
commit 691bc27686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ pub(crate) fn move_bounds_to_where_clause(mut ctx: AssistCtx<impl HirDatabase>)
}
let parent = type_param_list.syntax().parent()?;
if parent.children_with_tokens().find(|it| it.kind() == WHERE_CLAUSE).is_some() {
if parent.children_with_tokens().any(|it| it.kind() == WHERE_CLAUSE) {
return None;
}