From c50b4579ec842ac7c1f52e0e3c834d50fc9cd1bb Mon Sep 17 00:00:00 2001 From: Maan2003 Date: Sun, 13 Jun 2021 09:35:29 +0530 Subject: clippy::useless_return --- crates/proc_macro_srv/src/rustc_server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/proc_macro_srv/src') diff --git a/crates/proc_macro_srv/src/rustc_server.rs b/crates/proc_macro_srv/src/rustc_server.rs index 5d765f6e2..077b95ac8 100644 --- a/crates/proc_macro_srv/src/rustc_server.rs +++ b/crates/proc_macro_srv/src/rustc_server.rs @@ -539,7 +539,7 @@ impl server::Literal for Rustc { } else { n.parse::().unwrap().to_string() }; - return Literal { text: n.into(), id: tt::TokenId::unspecified() }; + Literal { text: n.into(), id: tt::TokenId::unspecified() } } fn typed_integer(&mut self, n: &str, kind: &str) -> Self::Literal { -- cgit v1.2.3 From aabd41cafc1a79f5ad124a31a360ab0442c13efd Mon Sep 17 00:00:00 2001 From: Maan2003 Date: Sun, 13 Jun 2021 09:40:22 +0530 Subject: clippy::redundant_field_names --- crates/proc_macro_srv/src/proc_macro/diagnostic.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/proc_macro_srv/src') diff --git a/crates/proc_macro_srv/src/proc_macro/diagnostic.rs b/crates/proc_macro_srv/src/proc_macro/diagnostic.rs index 55d93917c..a30818982 100644 --- a/crates/proc_macro_srv/src/proc_macro/diagnostic.rs +++ b/crates/proc_macro_srv/src/proc_macro/diagnostic.rs @@ -91,7 +91,7 @@ impl<'a> Iterator for Children<'a> { impl Diagnostic { /// Creates a new diagnostic with the given `level` and `message`. pub fn new>(level: Level, message: T) -> Diagnostic { - Diagnostic { level: level, message: message.into(), spans: vec![], children: vec![] } + Diagnostic { level, message: message.into(), spans: vec![], children: vec![] } } /// Creates a new diagnostic with the given `level` and `message` pointing to @@ -102,7 +102,7 @@ impl Diagnostic { T: Into, { Diagnostic { - level: level, + level, message: message.into(), spans: spans.into_spans(), children: vec![], -- cgit v1.2.3 From 5ac6804bb3a07b959e8c2c3534255a8d6bb4948c Mon Sep 17 00:00:00 2001 From: Maan2003 Date: Sun, 13 Jun 2021 09:48:15 +0530 Subject: cargo fmt --- crates/proc_macro_srv/src/proc_macro/diagnostic.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'crates/proc_macro_srv/src') diff --git a/crates/proc_macro_srv/src/proc_macro/diagnostic.rs b/crates/proc_macro_srv/src/proc_macro/diagnostic.rs index a30818982..9ceda2a47 100644 --- a/crates/proc_macro_srv/src/proc_macro/diagnostic.rs +++ b/crates/proc_macro_srv/src/proc_macro/diagnostic.rs @@ -101,12 +101,7 @@ impl Diagnostic { S: MultiSpan, T: Into, { - Diagnostic { - level, - message: message.into(), - spans: spans.into_spans(), - children: vec![], - } + Diagnostic { level, message: message.into(), spans: spans.into_spans(), children: vec![] } } diagnostic_child_methods!(span_error, error, Level::Error); -- cgit v1.2.3