Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/term_search/expr.rs')
-rw-r--r--crates/hir/src/term_search/expr.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir/src/term_search/expr.rs b/crates/hir/src/term_search/expr.rs
index 843831948a..78f534d014 100644
--- a/crates/hir/src/term_search/expr.rs
+++ b/crates/hir/src/term_search/expr.rs
@@ -336,10 +336,10 @@ impl<'db> Expr<'db> {
if let Expr::Method { func, params, .. } = self {
res.extend(params.iter().flat_map(|it| it.traits_used(db)));
- if let Some(it) = func.as_assoc_item(db) {
- if let Some(it) = it.container_or_implemented_trait(db) {
- res.push(it);
- }
+ if let Some(it) = func.as_assoc_item(db)
+ && let Some(it) = it.container_or_implemented_trait(db)
+ {
+ res.push(it);
}
}