From 2ae9dfa812ccf18867373f77a106161378a6d91d Mon Sep 17 00:00:00 2001 From: Alan Du Date: Tue, 16 Oct 2018 13:31:16 -0400 Subject: clippy: Fix new_ret_no_self --- crates/ra_editor/src/scope/fn_scope.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_editor/src/scope/fn_scope.rs') 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 { .syntax() .descendants() .filter_map(ast::BindPat::cast) - .filter_map(ScopeEntry::new); + .filter_map(ScopeEntry::new_opt); self.scopes[scope].entries.extend(entries); } fn add_params_bindings(&mut self, scope: ScopeId, params: Option) { @@ -88,7 +88,7 @@ pub struct ScopeEntry { } impl ScopeEntry { - fn new(pat: ast::BindPat) -> Option { + fn new_opt(pat: ast::BindPat) -> Option { if pat.name().is_some() { Some(ScopeEntry { syntax: pat.syntax().owned(), -- cgit v1.2.3