From 9c45a9e58632966984a79e18aa5221efb65e0ead Mon Sep 17 00:00:00 2001 From: Shotaro Yamada Date: Wed, 25 Sep 2019 10:32:01 +0900 Subject: Remove redundant clone() --- crates/ra_hir/src/source_binder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir/src/source_binder.rs') diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index 296acc364..bd4be8430 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs @@ -73,7 +73,7 @@ fn def_with_body_from_child_node( if let Some(def) = ast::ConstDef::cast(node.clone()) { return Some(Const { id: ctx.to_def(&def) }.into()); } - if let Some(def) = ast::StaticDef::cast(node.clone()) { + if let Some(def) = ast::StaticDef::cast(node) { return Some(Static { id: ctx.to_def(&def) }.into()); } None -- cgit v1.2.3