Skip to content

Commit 2f32221

Browse files
committed
Resolve clippy::redundant_field_names
error: redundant field names in struct initialization --> src/helpers.rs:199:34 | 199 | let place = mir::Place { local: local, projection: List::empty() }; | ^^^^^^^^^^^^ help: replace it with: `local` | = note: `-D clippy::redundant-field-names` implied by `-D clippy::all` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names error: redundant field names in struct initialization --> src/thread.rs:238:13 | 238 | threads: threads, | ^^^^^^^^^^^^^^^^ help: replace it with: `threads` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
1 parent 48f4f27 commit 2f32221

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

src/helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
196196
/// Get the `Place` for a local
197197
fn local_place(&mut self, local: mir::Local) -> InterpResult<'tcx, PlaceTy<'tcx, Tag>> {
198198
let this = self.eval_context_mut();
199-
let place = mir::Place { local: local, projection: List::empty() };
199+
let place = mir::Place { local, projection: List::empty() };
200200
this.eval_place(place)
201201
}
202202

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
clippy::manual_map,
2121
clippy::needless_lifetimes,
2222
clippy::new_without_default,
23-
clippy::redundant_field_names,
2423
clippy::single_char_add_str,
2524
clippy::single_char_pattern,
2625
clippy::single_match,

src/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ impl<'mir, 'tcx> Default for ThreadManager<'mir, 'tcx> {
235235
threads.push(main_thread);
236236
Self {
237237
active_thread: ThreadId::new(0),
238-
threads: threads,
238+
threads,
239239
sync: SynchronizationState::default(),
240240
thread_local_alloc_ids: Default::default(),
241241
yield_active_thread: false,

0 commit comments

Comments
 (0)