aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def
diff options
context:
space:
mode:
authorMaan2003 <[email protected]>2021-06-13 04:55:55 +0100
committerMaan2003 <[email protected]>2021-06-13 04:55:55 +0100
commit6cc6dee9e96d55dbbd8593523551a9981a691147 (patch)
treec9a790918f586acd877908a5b34e6b073d551b49 /crates/hir_def
parentc9b4ac5be4daaabc062ab1ee663eba8594750003 (diff)
clippy::useless_conversion
Diffstat (limited to 'crates/hir_def')
-rw-r--r--crates/hir_def/src/item_tree/pretty.rs2
-rw-r--r--crates/hir_def/src/lib.rs9
-rw-r--r--crates/hir_def/src/test_db.rs2
3 files changed, 5 insertions, 8 deletions
diff --git a/crates/hir_def/src/item_tree/pretty.rs b/crates/hir_def/src/item_tree/pretty.rs
index cc9944a22..b1e1b70d0 100644
--- a/crates/hir_def/src/item_tree/pretty.rs
+++ b/crates/hir_def/src/item_tree/pretty.rs
@@ -426,7 +426,7 @@ impl<'a> Printer<'a> {
426 w!(self, " {{"); 426 w!(self, " {{");
427 self.indented(|this| { 427 self.indented(|this| {
428 for item in &**items { 428 for item in &**items {
429 this.print_mod_item((*item).into()); 429 this.print_mod_item(*item);
430 } 430 }
431 }); 431 });
432 wln!(self, "}}"); 432 wln!(self, "}}");
diff --git a/crates/hir_def/src/lib.rs b/crates/hir_def/src/lib.rs
index 987485acc..3e7d496d5 100644
--- a/crates/hir_def/src/lib.rs
+++ b/crates/hir_def/src/lib.rs
@@ -736,8 +736,7 @@ fn macro_call_as_call_id(
736 db.upcast(), 736 db.upcast(),
737 krate, 737 krate,
738 MacroCallKind::FnLike { ast_id: call.ast_id, fragment }, 738 MacroCallKind::FnLike { ast_id: call.ast_id, fragment },
739 ) 739 ))
740 .into())
741 }; 740 };
742 Ok(res) 741 Ok(res)
743} 742}
@@ -765,8 +764,7 @@ fn derive_macro_as_call_id(
765 derive_name: last_segment.to_string(), 764 derive_name: last_segment.to_string(),
766 derive_attr_index: derive_attr.ast_index, 765 derive_attr_index: derive_attr.ast_index,
767 }, 766 },
768 ) 767 );
769 .into();
770 Ok(res) 768 Ok(res)
771} 769}
772 770
@@ -804,7 +802,6 @@ fn attr_macro_as_call_id(
804 attr_args: arg, 802 attr_args: arg,
805 invoc_attr_index: macro_attr.id.ast_index, 803 invoc_attr_index: macro_attr.id.ast_index,
806 }, 804 },
807 ) 805 );
808 .into();
809 Ok(res) 806 Ok(res)
810} 807}
diff --git a/crates/hir_def/src/test_db.rs b/crates/hir_def/src/test_db.rs
index b20b066e2..a16203fdb 100644
--- a/crates/hir_def/src/test_db.rs
+++ b/crates/hir_def/src/test_db.rs
@@ -325,7 +325,7 @@ impl TestDB {
325 for diag in source_map.diagnostics() { 325 for diag in source_map.diagnostics() {
326 let (ptr, message): (InFile<SyntaxNodePtr>, &str) = match diag { 326 let (ptr, message): (InFile<SyntaxNodePtr>, &str) = match diag {
327 BodyDiagnostic::InactiveCode { node, .. } => { 327 BodyDiagnostic::InactiveCode { node, .. } => {
328 (node.clone().map(|it| it.into()), "InactiveCode") 328 (node.clone().map(|it| it), "InactiveCode")
329 } 329 }
330 BodyDiagnostic::MacroError { node, message } => { 330 BodyDiagnostic::MacroError { node, message } => {
331 (node.clone().map(|it| it.into()), message.as_str()) 331 (node.clone().map(|it| it.into()), message.as_str())