aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src
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_db/src
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_db/src')
-rw-r--r--crates/ide_db/src/defs.rs2
-rw-r--r--crates/ide_db/src/helpers/insert_use.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide_db/src/defs.rs b/crates/ide_db/src/defs.rs
index f86e5ce93..75167ff39 100644
--- a/crates/ide_db/src/defs.rs
+++ b/crates/ide_db/src/defs.rs
@@ -181,7 +181,7 @@ impl NameClass {
181 }, 181 },
182 ast::SelfParam(it) => { 182 ast::SelfParam(it) => {
183 let def = sema.to_def(&it)?; 183 let def = sema.to_def(&it)?;
184 Some(NameClass::Definition(Definition::Local(def.into()))) 184 Some(NameClass::Definition(Definition::Local(def)))
185 }, 185 },
186 ast::RecordField(it) => { 186 ast::RecordField(it) => {
187 let field: hir::Field = sema.to_def(&it)?; 187 let field: hir::Field = sema.to_def(&it)?;
diff --git a/crates/ide_db/src/helpers/insert_use.rs b/crates/ide_db/src/helpers/insert_use.rs
index df66d8ea0..9e0cb91c3 100644
--- a/crates/ide_db/src/helpers/insert_use.rs
+++ b/crates/ide_db/src/helpers/insert_use.rs
@@ -80,7 +80,7 @@ impl ImportScope {
80 }) 80 })
81 .last() 81 .last()
82 .map(|last_inner_element| { 82 .map(|last_inner_element| {
83 (InsertPosition::After(last_inner_element.into()), AddBlankLine::BeforeTwice) 83 (InsertPosition::After(last_inner_element), AddBlankLine::BeforeTwice)
84 }) 84 })
85 .unwrap_or_else(|| self.first_insert_pos()) 85 .unwrap_or_else(|| self.first_insert_pos())
86 } 86 }