From 9452dfaac73cf1ad99e43795f3b1066e54e32abd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Thu, 3 Jun 2021 15:32:46 +0200 Subject: NFC: remove redundant clones (clippy::perf) --- crates/ide_assists/src/handlers/extract_type_alias.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ide_assists/src') diff --git a/crates/ide_assists/src/handlers/extract_type_alias.rs b/crates/ide_assists/src/handlers/extract_type_alias.rs index 4bccf5984..eac8857c6 100644 --- a/crates/ide_assists/src/handlers/extract_type_alias.rs +++ b/crates/ide_assists/src/handlers/extract_type_alias.rs @@ -31,7 +31,7 @@ pub(crate) fn extract_type_alias(acc: &mut Assists, ctx: &AssistContext) -> Opti let item = ctx.find_node_at_offset::()?; let insert = match_ast! { match (item.syntax().parent()?) { - ast::AssocItemList(it) => it.syntax().parent()?.clone(), + ast::AssocItemList(it) => it.syntax().parent()?, _ => item.syntax().clone(), } }; -- cgit v1.2.3