diff options
author | Maan2003 <[email protected]> | 2021-06-13 05:10:22 +0100 |
---|---|---|
committer | Maan2003 <[email protected]> | 2021-06-13 05:10:22 +0100 |
commit | aabd41cafc1a79f5ad124a31a360ab0442c13efd (patch) | |
tree | 584a7f437204904fcf23b55e201cb27323790b02 /crates | |
parent | b857a5dcf094728b4beefd652ea31d2828eb0e10 (diff) |
clippy::redundant_field_names
Diffstat (limited to 'crates')
-rw-r--r-- | crates/hir_ty/src/infer/pat.rs | 2 | ||||
-rw-r--r-- | crates/ide_assists/src/assist_context.rs | 2 | ||||
-rw-r--r-- | crates/ide_completion/src/completions/postfix/format_like.rs | 2 | ||||
-rw-r--r-- | crates/ide_ssr/src/tests.rs | 2 | ||||
-rw-r--r-- | crates/mbe/src/expander/transcriber.rs | 2 | ||||
-rw-r--r-- | crates/proc_macro_srv/src/proc_macro/diagnostic.rs | 4 |
6 files changed, 7 insertions, 7 deletions
diff --git a/crates/hir_ty/src/infer/pat.rs b/crates/hir_ty/src/infer/pat.rs index 8f5db1f40..035f4ded6 100644 --- a/crates/hir_ty/src/infer/pat.rs +++ b/crates/hir_ty/src/infer/pat.rs | |||
@@ -275,7 +275,7 @@ impl<'a> InferenceContext<'a> { | |||
275 | if !self.unify(&ty, &expected) { | 275 | if !self.unify(&ty, &expected) { |
276 | self.result | 276 | self.result |
277 | .type_mismatches | 277 | .type_mismatches |
278 | .insert(pat.into(), TypeMismatch { expected: expected, actual: ty.clone() }); | 278 | .insert(pat.into(), TypeMismatch { expected, actual: ty.clone() }); |
279 | } | 279 | } |
280 | self.write_pat_ty(pat, ty.clone()); | 280 | self.write_pat_ty(pat, ty.clone()); |
281 | ty | 281 | ty |
diff --git a/crates/ide_assists/src/assist_context.rs b/crates/ide_assists/src/assist_context.rs index 8fc40f9bd..d207cacb2 100644 --- a/crates/ide_assists/src/assist_context.rs +++ b/crates/ide_assists/src/assist_context.rs | |||
@@ -292,7 +292,7 @@ impl AssistBuilder { | |||
292 | } | 292 | } |
293 | pub(crate) fn create_file(&mut self, dst: AnchoredPathBuf, content: impl Into<String>) { | 293 | pub(crate) fn create_file(&mut self, dst: AnchoredPathBuf, content: impl Into<String>) { |
294 | let file_system_edit = | 294 | let file_system_edit = |
295 | FileSystemEdit::CreateFile { dst: dst, initial_contents: content.into() }; | 295 | FileSystemEdit::CreateFile { dst, initial_contents: content.into() }; |
296 | self.source_change.push_file_system_edit(file_system_edit); | 296 | self.source_change.push_file_system_edit(file_system_edit); |
297 | } | 297 | } |
298 | 298 | ||
diff --git a/crates/ide_completion/src/completions/postfix/format_like.rs b/crates/ide_completion/src/completions/postfix/format_like.rs index f619f8b52..2dc13c293 100644 --- a/crates/ide_completion/src/completions/postfix/format_like.rs +++ b/crates/ide_completion/src/completions/postfix/format_like.rs | |||
@@ -91,7 +91,7 @@ enum State { | |||
91 | impl FormatStrParser { | 91 | impl FormatStrParser { |
92 | pub(crate) fn new(input: String) -> Self { | 92 | pub(crate) fn new(input: String) -> Self { |
93 | Self { | 93 | Self { |
94 | input: input, | 94 | input, |
95 | output: String::new(), | 95 | output: String::new(), |
96 | extracted_expressions: Vec::new(), | 96 | extracted_expressions: Vec::new(), |
97 | state: State::NotExpr, | 97 | state: State::NotExpr, |
diff --git a/crates/ide_ssr/src/tests.rs b/crates/ide_ssr/src/tests.rs index 5dd0d600f..444c6b0af 100644 --- a/crates/ide_ssr/src/tests.rs +++ b/crates/ide_ssr/src/tests.rs | |||
@@ -75,7 +75,7 @@ pub(crate) fn single_file(code: &str) -> (ide_db::RootDatabase, FilePosition, Ve | |||
75 | match range_or_offset { | 75 | match range_or_offset { |
76 | RangeOrOffset::Range(range) => { | 76 | RangeOrOffset::Range(range) => { |
77 | position = FilePosition { file_id, offset: range.start() }; | 77 | position = FilePosition { file_id, offset: range.start() }; |
78 | selections = vec![FileRange { file_id, range: range }]; | 78 | selections = vec![FileRange { file_id, range }]; |
79 | } | 79 | } |
80 | RangeOrOffset::Offset(offset) => { | 80 | RangeOrOffset::Offset(offset) => { |
81 | position = FilePosition { file_id, offset }; | 81 | position = FilePosition { file_id, offset }; |
diff --git a/crates/mbe/src/expander/transcriber.rs b/crates/mbe/src/expander/transcriber.rs index 9a9c1a467..49a137577 100644 --- a/crates/mbe/src/expander/transcriber.rs +++ b/crates/mbe/src/expander/transcriber.rs | |||
@@ -55,7 +55,7 @@ pub(super) fn transcribe( | |||
55 | template: &MetaTemplate, | 55 | template: &MetaTemplate, |
56 | bindings: &Bindings, | 56 | bindings: &Bindings, |
57 | ) -> ExpandResult<tt::Subtree> { | 57 | ) -> ExpandResult<tt::Subtree> { |
58 | let mut ctx = ExpandCtx { bindings: bindings, nesting: Vec::new() }; | 58 | let mut ctx = ExpandCtx { bindings, nesting: Vec::new() }; |
59 | let mut arena: Vec<tt::TokenTree> = Vec::new(); | 59 | let mut arena: Vec<tt::TokenTree> = Vec::new(); |
60 | expand_subtree(&mut ctx, template, None, &mut arena) | 60 | expand_subtree(&mut ctx, template, None, &mut arena) |
61 | } | 61 | } |
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> { | |||
91 | impl Diagnostic { | 91 | impl Diagnostic { |
92 | /// Creates a new diagnostic with the given `level` and `message`. | 92 | /// Creates a new diagnostic with the given `level` and `message`. |
93 | pub fn new<T: Into<String>>(level: Level, message: T) -> Diagnostic { | 93 | pub fn new<T: Into<String>>(level: Level, message: T) -> Diagnostic { |
94 | Diagnostic { level: level, message: message.into(), spans: vec![], children: vec![] } | 94 | Diagnostic { level, message: message.into(), spans: vec![], children: vec![] } |
95 | } | 95 | } |
96 | 96 | ||
97 | /// Creates a new diagnostic with the given `level` and `message` pointing to | 97 | /// Creates a new diagnostic with the given `level` and `message` pointing to |
@@ -102,7 +102,7 @@ impl Diagnostic { | |||
102 | T: Into<String>, | 102 | T: Into<String>, |
103 | { | 103 | { |
104 | Diagnostic { | 104 | Diagnostic { |
105 | level: level, | 105 | level, |
106 | message: message.into(), | 106 | message: message.into(), |
107 | spans: spans.into_spans(), | 107 | spans: spans.into_spans(), |
108 | children: vec![], | 108 | children: vec![], |