aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
authorMaan2003 <[email protected]>2021-06-13 04:59:36 +0100
committerMaan2003 <[email protected]>2021-06-13 04:59:36 +0100
commit75370312fbfe072947ffdc568eebc9cb4c6108e4 (patch)
treecb435a1c147db6891c7f6cf625efd8876f427788 /crates/ide
parent705f7e6e2644bf5de4255bc05ea8d9d5027c29b0 (diff)
clippy::redundant_closure
Diffstat (limited to 'crates/ide')
-rw-r--r--crates/ide/src/hover.rs2
-rw-r--r--crates/ide/src/references/rename.rs2
2 files changed, 2 insertions, 2 deletions
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(
288) -> Option<HoverAction> { 288) -> Option<HoverAction> {
289 match def { 289 match def {
290 Definition::ModuleDef(it) => match it { 290 Definition::ModuleDef(it) => match it {
291 ModuleDef::Module(it) => runnable_mod(sema, it).map(|it| HoverAction::Runnable(it)), 291 ModuleDef::Module(it) => runnable_mod(sema, it).map(HoverAction::Runnable),
292 ModuleDef::Function(func) => { 292 ModuleDef::Function(func) => {
293 let src = func.source(sema.db)?; 293 let src = func.source(sema.db)?;
294 if src.file_id != file_id.into() { 294 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
426 None 426 None
427 } 427 }
428 428
429 let impl_def = self_param.syntax().ancestors().find_map(|it| ast::Impl::cast(it))?; 429 let impl_def = self_param.syntax().ancestors().find_map(ast::Impl::cast)?;
430 let type_name = target_type_name(&impl_def)?; 430 let type_name = target_type_name(&impl_def)?;
431 431
432 let mut replacement_text = String::from(new_name); 432 let mut replacement_text = String::from(new_name);