Pacify clippy
This commit is contained in:
@ -45,7 +45,7 @@ use std::{
|
||||
cmp,
|
||||
collections::{HashMap, HashSet},
|
||||
fs,
|
||||
io::{Error as IOError, ErrorKind},
|
||||
io::{Error as IoError, ErrorKind},
|
||||
path::{Path, PathBuf},
|
||||
rc::Rc,
|
||||
sync::{
|
||||
@ -2082,7 +2082,7 @@ impl Blockstore {
|
||||
Some((slot, _)) => {
|
||||
let confirmed_block =
|
||||
self.get_confirmed_block(slot, false).map_err(|err| {
|
||||
BlockstoreError::IO(IOError::new(
|
||||
BlockstoreError::Io(IoError::new(
|
||||
ErrorKind::Other,
|
||||
format!("Unable to get confirmed block: {}", err),
|
||||
))
|
||||
@ -2133,7 +2133,7 @@ impl Blockstore {
|
||||
Some((slot, _)) => {
|
||||
let confirmed_block =
|
||||
self.get_confirmed_block(slot, false).map_err(|err| {
|
||||
BlockstoreError::IO(IOError::new(
|
||||
BlockstoreError::Io(IoError::new(
|
||||
ErrorKind::Other,
|
||||
format!("Unable to get confirmed block: {}", err),
|
||||
))
|
||||
@ -3256,7 +3256,7 @@ pub fn create_new_ledger(
|
||||
error!("tar stdout: {}", from_utf8(&output.stdout).unwrap_or("?"));
|
||||
error!("tar stderr: {}", from_utf8(&output.stderr).unwrap_or("?"));
|
||||
|
||||
return Err(BlockstoreError::IO(IOError::new(
|
||||
return Err(BlockstoreError::Io(IoError::new(
|
||||
ErrorKind::Other,
|
||||
format!(
|
||||
"Error trying to generate snapshot archive: {}",
|
||||
@ -3303,7 +3303,7 @@ pub fn create_new_ledger(
|
||||
error_messages += &format!("/failed to stash problematic rocksdb: {}", e)
|
||||
});
|
||||
|
||||
return Err(BlockstoreError::IO(IOError::new(
|
||||
return Err(BlockstoreError::Io(IoError::new(
|
||||
ErrorKind::Other,
|
||||
format!(
|
||||
"Error checking to unpack genesis archive: {}{}",
|
||||
|
@ -64,7 +64,7 @@ pub enum BlockstoreError {
|
||||
RocksDb(#[from] rocksdb::Error),
|
||||
SlotNotRooted,
|
||||
DeadSlot,
|
||||
IO(#[from] std::io::Error),
|
||||
Io(#[from] std::io::Error),
|
||||
Serialize(#[from] Box<bincode::ErrorKind>),
|
||||
FsExtraError(#[from] fs_extra::error::Error),
|
||||
SlotCleanedUp,
|
||||
|
@ -214,8 +214,8 @@ pub struct GpuVerificationData {
|
||||
}
|
||||
|
||||
pub enum DeviceVerificationData {
|
||||
CPU(),
|
||||
GPU(GpuVerificationData),
|
||||
Cpu(),
|
||||
Gpu(GpuVerificationData),
|
||||
}
|
||||
|
||||
pub struct EntryVerificationState {
|
||||
@ -257,7 +257,7 @@ impl EntryVerificationState {
|
||||
|
||||
pub fn finish_verify(&mut self, entries: &[Entry]) -> bool {
|
||||
match &mut self.device_verification_data {
|
||||
DeviceVerificationData::GPU(verification_state) => {
|
||||
DeviceVerificationData::Gpu(verification_state) => {
|
||||
let gpu_time_us = verification_state.thread_h.take().unwrap().join().unwrap();
|
||||
|
||||
let mut verify_check_time = Measure::start("verify_check");
|
||||
@ -297,7 +297,7 @@ impl EntryVerificationState {
|
||||
};
|
||||
res
|
||||
}
|
||||
DeviceVerificationData::CPU() => {
|
||||
DeviceVerificationData::Cpu() => {
|
||||
self.verification_status == EntryVerificationStatus::Success
|
||||
}
|
||||
}
|
||||
@ -380,7 +380,7 @@ impl EntrySlice for [Entry] {
|
||||
},
|
||||
poh_duration_us,
|
||||
transaction_duration_us: 0,
|
||||
device_verification_data: DeviceVerificationData::CPU(),
|
||||
device_verification_data: DeviceVerificationData::Cpu(),
|
||||
}
|
||||
}
|
||||
|
||||
@ -464,7 +464,7 @@ impl EntrySlice for [Entry] {
|
||||
},
|
||||
poh_duration_us,
|
||||
transaction_duration_us: 0,
|
||||
device_verification_data: DeviceVerificationData::CPU(),
|
||||
device_verification_data: DeviceVerificationData::Cpu(),
|
||||
}
|
||||
}
|
||||
|
||||
@ -527,7 +527,7 @@ impl EntrySlice for [Entry] {
|
||||
verification_status: EntryVerificationStatus::Failure,
|
||||
transaction_duration_us,
|
||||
poh_duration_us: 0,
|
||||
device_verification_data: DeviceVerificationData::CPU(),
|
||||
device_verification_data: DeviceVerificationData::Cpu(),
|
||||
};
|
||||
}
|
||||
|
||||
@ -607,7 +607,7 @@ impl EntrySlice for [Entry] {
|
||||
})
|
||||
});
|
||||
|
||||
let device_verification_data = DeviceVerificationData::GPU(GpuVerificationData {
|
||||
let device_verification_data = DeviceVerificationData::Gpu(GpuVerificationData {
|
||||
thread_h: Some(gpu_verify_thread),
|
||||
tx_hashes,
|
||||
hashes: Some(hashes),
|
||||
|
Reference in New Issue
Block a user