aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax
diff options
context:
space:
mode:
authorMatthias Krüger <[email protected]>2021-03-17 00:27:56 +0000
committerMatthias Krüger <[email protected]>2021-03-17 00:27:56 +0000
commit966c23f5290275ce17564f6027a17ec20cd6078f (patch)
tree9e977a29eaf10d1733340563ef31fda064e37400 /crates/syntax
parent83e6940efb42675226adb8d2856c095b8dce36c5 (diff)
avoid converting types into themselves via .into() (clippy::useless-conversion)
example: let x: String = String::from("hello world").into();
Diffstat (limited to 'crates/syntax')
-rw-r--r--crates/syntax/src/ast/edit.rs2
-rw-r--r--crates/syntax/src/ted.rs2
2 files changed, 2 insertions, 2 deletions
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 {
479 Some(t) => t, 479 Some(t) => t,
480 None => return self.clone(), 480 None => return self.clone(),
481 }; 481 };
482 let position = InsertPosition::Before(r_curly.into()); 482 let position = InsertPosition::Before(r_curly);
483 let arm_ws = tokens::WsBuilder::new(" "); 483 let arm_ws = tokens::WsBuilder::new(" ");
484 let match_indent = &leading_indent(self.syntax()).unwrap_or_default(); 484 let match_indent = &leading_indent(self.syntax()).unwrap_or_default();
485 let match_ws = tokens::WsBuilder::new(&format!("\n{}", match_indent)); 485 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<SyntaxToken
122 if right.kind() == T![;] || right.kind() == T![,] { 122 if right.kind() == T![;] || right.kind() == T![,] {
123 return None; 123 return None;
124 } 124 }
125 Some(make::tokens::single_space().into()) 125 Some(make::tokens::single_space())
126} 126}