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/ide_completion/src/completions.rs | 2 +- crates/ide_completion/src/completions/postfix/format_like.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ide_completion') 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 { impl Completions { pub(crate) fn add(&mut self, item: CompletionItem) { - self.buf.push(item.into()) + self.buf.push(item) } pub(crate) fn add_all(&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 { impl FormatStrParser { pub(crate) fn new(input: String) -> Self { Self { - input: input.into(), + input: input, output: String::new(), extracted_expressions: Vec::new(), state: State::NotExpr, -- cgit v1.2.3