aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_editor/src/scope/fn_scope.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_editor/src/scope/fn_scope.rs')
-rw-r--r--crates/ra_editor/src/scope/fn_scope.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_editor/src/scope/fn_scope.rs b/crates/ra_editor/src/scope/fn_scope.rs
index 9088e5a60..84f036c7e 100644
--- a/crates/ra_editor/src/scope/fn_scope.rs
+++ b/crates/ra_editor/src/scope/fn_scope.rs
@@ -63,7 +63,7 @@ impl FnScopes {
63 .syntax() 63 .syntax()
64 .descendants() 64 .descendants()
65 .filter_map(ast::BindPat::cast) 65 .filter_map(ast::BindPat::cast)
66 .filter_map(ScopeEntry::new); 66 .filter_map(ScopeEntry::new_opt);
67 self.scopes[scope].entries.extend(entries); 67 self.scopes[scope].entries.extend(entries);
68 } 68 }
69 fn add_params_bindings(&mut self, scope: ScopeId, params: Option<ast::ParamList>) { 69 fn add_params_bindings(&mut self, scope: ScopeId, params: Option<ast::ParamList>) {
@@ -88,7 +88,7 @@ pub struct ScopeEntry {
88} 88}
89 89
90impl ScopeEntry { 90impl ScopeEntry {
91 fn new(pat: ast::BindPat) -> Option<ScopeEntry> { 91 fn new_opt(pat: ast::BindPat) -> Option<ScopeEntry> {
92 if pat.name().is_some() { 92 if pat.name().is_some() {
93 Some(ScopeEntry { 93 Some(ScopeEntry {
94 syntax: pat.syntax().owned(), 94 syntax: pat.syntax().owned(),