From 966c23f5290275ce17564f6027a17ec20cd6078f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Wed, 17 Mar 2021 01:27:56 +0100 Subject: avoid converting types into themselves via .into() (clippy::useless-conversion) example: let x: String = String::from("hello world").into(); --- crates/syntax/src/ast/edit.rs | 2 +- crates/syntax/src/ted.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/syntax') diff --git a/crates/syntax/src/ast/edit.rs b/crates/syntax/src/ast/edit.rs index 0b3b76d4a..64fac13a7 100644 --- a/crates/syntax/src/ast/edit.rs +++ b/crates/syntax/src/ast/edit.rs @@ -479,7 +479,7 @@ impl ast::MatchArmList { Some(t) => t, None => return self.clone(), }; - let position = InsertPosition::Before(r_curly.into()); + let position = InsertPosition::Before(r_curly); let arm_ws = tokens::WsBuilder::new(" "); let match_indent = &leading_indent(self.syntax()).unwrap_or_default(); let match_ws = tokens::WsBuilder::new(&format!("\n{}", match_indent)); diff --git a/crates/syntax/src/ted.rs b/crates/syntax/src/ted.rs index 76f950ef9..442dfa14a 100644 --- a/crates/syntax/src/ted.rs +++ b/crates/syntax/src/ted.rs @@ -122,5 +122,5 @@ fn ws_between(left: &SyntaxElement, right: &SyntaxElement) -> Option