Skip to content

Commit aabd41c

Browse files
committed
clippy::redundant_field_names
1 parent b857a5d commit aabd41c

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

crates/hir_ty/src/infer/pat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ impl<'a> InferenceContext<'a> {
275275
if !self.unify(&ty, &expected) {
276276
self.result
277277
.type_mismatches
278-
.insert(pat.into(), TypeMismatch { expected: expected, actual: ty.clone() });
278+
.insert(pat.into(), TypeMismatch { expected, actual: ty.clone() });
279279
}
280280
self.write_pat_ty(pat, ty.clone());
281281
ty

crates/ide_assists/src/assist_context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ impl AssistBuilder {
292292
}
293293
pub(crate) fn create_file(&mut self, dst: AnchoredPathBuf, content: impl Into<String>) {
294294
let file_system_edit =
295-
FileSystemEdit::CreateFile { dst: dst, initial_contents: content.into() };
295+
FileSystemEdit::CreateFile { dst, initial_contents: content.into() };
296296
self.source_change.push_file_system_edit(file_system_edit);
297297
}
298298

crates/ide_completion/src/completions/postfix/format_like.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ enum State {
9191
impl FormatStrParser {
9292
pub(crate) fn new(input: String) -> Self {
9393
Self {
94-
input: input,
94+
input,
9595
output: String::new(),
9696
extracted_expressions: Vec::new(),
9797
state: State::NotExpr,

crates/ide_ssr/src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub(crate) fn single_file(code: &str) -> (ide_db::RootDatabase, FilePosition, Ve
7575
match range_or_offset {
7676
RangeOrOffset::Range(range) => {
7777
position = FilePosition { file_id, offset: range.start() };
78-
selections = vec![FileRange { file_id, range: range }];
78+
selections = vec![FileRange { file_id, range }];
7979
}
8080
RangeOrOffset::Offset(offset) => {
8181
position = FilePosition { file_id, offset };

crates/mbe/src/expander/transcriber.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub(super) fn transcribe(
5555
template: &MetaTemplate,
5656
bindings: &Bindings,
5757
) -> ExpandResult<tt::Subtree> {
58-
let mut ctx = ExpandCtx { bindings: bindings, nesting: Vec::new() };
58+
let mut ctx = ExpandCtx { bindings, nesting: Vec::new() };
5959
let mut arena: Vec<tt::TokenTree> = Vec::new();
6060
expand_subtree(&mut ctx, template, None, &mut arena)
6161
}

crates/proc_macro_srv/src/proc_macro/diagnostic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl<'a> Iterator for Children<'a> {
9191
impl Diagnostic {
9292
/// Creates a new diagnostic with the given `level` and `message`.
9393
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![] }
9595
}
9696

9797
/// Creates a new diagnostic with the given `level` and `message` pointing to
@@ -102,7 +102,7 @@ impl Diagnostic {
102102
T: Into<String>,
103103
{
104104
Diagnostic {
105-
level: level,
105+
level,
106106
message: message.into(),
107107
spans: spans.into_spans(),
108108
children: vec![],

0 commit comments

Comments
 (0)