Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/lib.rs')
| -rw-r--r-- | crates/hir/src/lib.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 3ec60ca69e..b75c4bb36d 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -2081,9 +2081,7 @@ impl Function { } pub fn method_params(self, db: &dyn HirDatabase) -> Option<Vec<Param>> { - if self.self_param(db).is_none() { - return None; - } + self.self_param(db)?; Some(self.params_without_self(db)) } |