From 75370312fbfe072947ffdc568eebc9cb4c6108e4 Mon Sep 17 00:00:00 2001 From: Maan2003 Date: Sun, 13 Jun 2021 09:29:36 +0530 Subject: clippy::redundant_closure --- crates/ide/src/hover.rs | 2 +- crates/ide/src/references/rename.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ide') diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs index 4ba4f61d8..c08516805 100644 --- a/crates/ide/src/hover.rs +++ b/crates/ide/src/hover.rs @@ -288,7 +288,7 @@ fn runnable_action( ) -> Option { match def { Definition::ModuleDef(it) => match it { - ModuleDef::Module(it) => runnable_mod(sema, it).map(|it| HoverAction::Runnable(it)), + ModuleDef::Module(it) => runnable_mod(sema, it).map(HoverAction::Runnable), ModuleDef::Function(func) => { let src = func.source(sema.db)?; if src.file_id != file_id.into() { diff --git a/crates/ide/src/references/rename.rs b/crates/ide/src/references/rename.rs index 02b171bda..50cc1f963 100644 --- a/crates/ide/src/references/rename.rs +++ b/crates/ide/src/references/rename.rs @@ -426,7 +426,7 @@ fn text_edit_from_self_param(self_param: &ast::SelfParam, new_name: &str) -> Opt None } - let impl_def = self_param.syntax().ancestors().find_map(|it| ast::Impl::cast(it))?; + let impl_def = self_param.syntax().ancestors().find_map(ast::Impl::cast)?; let type_name = target_type_name(&impl_def)?; let mut replacement_text = String::from(new_name); -- cgit v1.2.3