aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion
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/ide_completion
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/ide_completion')
-rw-r--r--crates/ide_completion/src/completions.rs2
-rw-r--r--crates/ide_completion/src/completions/postfix/format_like.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide_completion/src/completions.rs b/crates/ide_completion/src/completions.rs
index 3b582ed07..09882c4f3 100644
--- a/crates/ide_completion/src/completions.rs
+++ b/crates/ide_completion/src/completions.rs
@@ -56,7 +56,7 @@ impl Builder {
56 56
57impl Completions { 57impl Completions {
58 pub(crate) fn add(&mut self, item: CompletionItem) { 58 pub(crate) fn add(&mut self, item: CompletionItem) {
59 self.buf.push(item.into()) 59 self.buf.push(item)
60 } 60 }
61 61
62 pub(crate) fn add_all<I>(&mut self, items: I) 62 pub(crate) fn add_all<I>(&mut self, items: I)
diff --git a/crates/ide_completion/src/completions/postfix/format_like.rs b/crates/ide_completion/src/completions/postfix/format_like.rs
index cee4eec10..3f1c6730b 100644
--- a/crates/ide_completion/src/completions/postfix/format_like.rs
+++ b/crates/ide_completion/src/completions/postfix/format_like.rs
@@ -89,7 +89,7 @@ enum State {
89impl FormatStrParser { 89impl FormatStrParser {
90 pub(crate) fn new(input: String) -> Self { 90 pub(crate) fn new(input: String) -> Self {
91 Self { 91 Self {
92 input: input.into(), 92 input: input,
93 output: String::new(), 93 output: String::new(),
94 extracted_expressions: Vec::new(), 94 extracted_expressions: Vec::new(),
95 state: State::NotExpr, 95 state: State::NotExpr,