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/proc_macro') 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/proc_macro') 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