Address latest nightly clippy lints, but globally disable stable_sort_primitive

This commit is contained in:
Michael Vines
2020-08-14 11:43:14 -07:00
parent a86397a650
commit d15173ad9d
13 changed files with 27 additions and 3 deletions

View File

@ -6600,6 +6600,7 @@ pub mod tests {
}
#[test]
#[allow(clippy::same_item_push)]
fn test_get_last_hash() {
let mut entries: Vec<Entry> = vec![];
let empty_entries_iterator = entries.iter();

View File

@ -638,6 +638,7 @@ pub fn next_entry_mut(start: &mut Hash, num_hashes: u64, transactions: Vec<Trans
entry
}
#[allow(clippy::same_item_push)]
pub fn create_ticks(num_ticks: u64, hashes_per_tick: u64, mut hash: Hash) -> Vec<Entry> {
let mut ticks = Vec::with_capacity(num_ticks as usize);
for _ in 0..num_ticks {
@ -648,6 +649,7 @@ pub fn create_ticks(num_ticks: u64, hashes_per_tick: u64, mut hash: Hash) -> Vec
ticks
}
#[allow(clippy::same_item_push)]
pub fn create_random_ticks(num_ticks: u64, max_hashes_per_tick: u64, mut hash: Hash) -> Vec<Entry> {
let mut ticks = Vec::with_capacity(num_ticks as usize);
for _ in 0..num_ticks {