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

@ -1966,6 +1966,7 @@ impl Bank {
}
}
#[allow(clippy::needless_collect)]
fn distribute_rent_to_validators(
&self,
vote_account_hashmap: &HashMap<Pubkey, (u64, Account)>,

View File

@ -92,7 +92,7 @@ impl SnapshotVersion {
}
}
#[derive(PartialEq, Ord, Eq, Debug)]
#[derive(PartialEq, Eq, Debug)]
pub struct SlotSnapshotPaths {
pub slot: Slot,
pub snapshot_file_path: PathBuf,
@ -126,6 +126,12 @@ impl PartialOrd for SlotSnapshotPaths {
}
}
impl Ord for SlotSnapshotPaths {
fn cmp(&self, other: &Self) -> Ordering {
self.slot.cmp(&other.slot)
}
}
impl SlotSnapshotPaths {
fn copy_snapshot_directory<P: AsRef<Path>>(&self, snapshot_hardlink_dir: P) -> Result<()> {
// Create a new directory in snapshot_hardlink_dir