mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: fix all the obvious clippy warnings (#1520)
This commit is contained in:
@ -258,8 +258,8 @@ mod tests {
|
||||
}
|
||||
|
||||
async fn run(tx: &TestTransaction, run_to: u64) {
|
||||
let mut input = ExecInput::default();
|
||||
input.previous_stage = Some((PREV_STAGE_ID, run_to));
|
||||
let input =
|
||||
ExecInput { previous_stage: Some((PREV_STAGE_ID, run_to)), ..Default::default() };
|
||||
let mut stage = IndexAccountHistoryStage::default();
|
||||
let mut tx = tx.inner();
|
||||
let out = stage.execute(&mut tx, input).await.unwrap();
|
||||
@ -268,9 +268,7 @@ mod tests {
|
||||
}
|
||||
|
||||
async fn unwind(tx: &TestTransaction, unwind_from: u64, unwind_to: u64) {
|
||||
let mut input = UnwindInput::default();
|
||||
input.stage_progress = unwind_from;
|
||||
input.unwind_to = unwind_to;
|
||||
let input = UnwindInput { stage_progress: unwind_from, unwind_to, ..Default::default() };
|
||||
let mut stage = IndexAccountHistoryStage::default();
|
||||
let mut tx = tx.inner();
|
||||
let out = stage.unwind(&mut tx, input).await.unwrap();
|
||||
|
||||
@ -282,8 +282,8 @@ mod tests {
|
||||
}
|
||||
|
||||
async fn run(tx: &TestTransaction, run_to: u64) {
|
||||
let mut input = ExecInput::default();
|
||||
input.previous_stage = Some((PREV_STAGE_ID, run_to));
|
||||
let input =
|
||||
ExecInput { previous_stage: Some((PREV_STAGE_ID, run_to)), ..Default::default() };
|
||||
let mut stage = IndexStorageHistoryStage::default();
|
||||
let mut tx = tx.inner();
|
||||
let out = stage.execute(&mut tx, input).await.unwrap();
|
||||
@ -292,9 +292,7 @@ mod tests {
|
||||
}
|
||||
|
||||
async fn unwind(tx: &TestTransaction, unwind_from: u64, unwind_to: u64) {
|
||||
let mut input = UnwindInput::default();
|
||||
input.stage_progress = unwind_from;
|
||||
input.unwind_to = unwind_to;
|
||||
let input = UnwindInput { stage_progress: unwind_from, unwind_to, ..Default::default() };
|
||||
let mut stage = IndexStorageHistoryStage::default();
|
||||
let mut tx = tx.inner();
|
||||
let out = stage.unwind(&mut tx, input).await.unwrap();
|
||||
@ -357,8 +355,7 @@ mod tests {
|
||||
async fn insert_index_to_full_shard() {
|
||||
// init
|
||||
let tx = TestTransaction::default();
|
||||
let mut input = ExecInput::default();
|
||||
input.previous_stage = Some((PREV_STAGE_ID, 5));
|
||||
let _input = ExecInput { previous_stage: Some((PREV_STAGE_ID, 5)), ..Default::default() };
|
||||
|
||||
// change does not matter only that account is present in changeset.
|
||||
let full_list = vec![3; NUM_OF_INDICES_IN_SHARD];
|
||||
|
||||
@ -147,7 +147,7 @@ where
|
||||
crsr.append(k, v).expect("submit");
|
||||
}
|
||||
|
||||
tx.inner.commit().unwrap();
|
||||
tx.inner.commit().unwrap()
|
||||
});
|
||||
},
|
||||
)
|
||||
@ -171,7 +171,7 @@ where
|
||||
crsr.insert(k, v).expect("submit");
|
||||
}
|
||||
|
||||
tx.inner.commit().unwrap();
|
||||
tx.inner.commit().unwrap()
|
||||
});
|
||||
},
|
||||
)
|
||||
@ -241,7 +241,7 @@ where
|
||||
crsr.append_dup(k, v).expect("submit");
|
||||
}
|
||||
|
||||
tx.inner.commit().unwrap();
|
||||
tx.inner.commit().unwrap()
|
||||
});
|
||||
},
|
||||
)
|
||||
|
||||
@ -39,7 +39,7 @@ pub fn hash_keys(c: &mut Criterion) {
|
||||
|
||||
group.sample_size(10);
|
||||
|
||||
for size in vec![10_000, 100_000, 1_000_000] {
|
||||
for size in [10_000, 100_000, 1_000_000] {
|
||||
measure_table_insertion::<TxHashNumber>(&mut group, size);
|
||||
}
|
||||
}
|
||||
@ -176,7 +176,7 @@ where
|
||||
crsr.append(k, v).expect("submit");
|
||||
}
|
||||
|
||||
tx.inner.commit().unwrap();
|
||||
tx.inner.commit().unwrap()
|
||||
});
|
||||
}
|
||||
db
|
||||
@ -197,7 +197,7 @@ where
|
||||
crsr.insert(k, v).expect("submit");
|
||||
}
|
||||
|
||||
tx.inner.commit().unwrap();
|
||||
tx.inner.commit().unwrap()
|
||||
});
|
||||
}
|
||||
db
|
||||
@ -214,7 +214,7 @@ where
|
||||
tx.put::<T>(k, v).expect("submit");
|
||||
}
|
||||
|
||||
tx.inner.commit().unwrap();
|
||||
tx.inner.commit().unwrap()
|
||||
});
|
||||
}
|
||||
db
|
||||
|
||||
Reference in New Issue
Block a user