Resolve nightly-2021-10-05 clippy complaints

This commit is contained in:
Michael Vines
2021-10-05 22:24:48 -07:00
parent eb4ce3dfed
commit 7027d56064
53 changed files with 229 additions and 293 deletions

View File

@ -6,6 +6,7 @@ use std::alloc::Layout;
#[derive(Debug)]
pub struct BpfAllocator {
#[allow(dead_code)]
heap: AlignedMemory,
start: u64,
len: u64,

View File

@ -1822,7 +1822,9 @@ struct SolAccountInfo {
data_addr: u64,
owner_addr: u64,
rent_epoch: u64,
#[allow(dead_code)]
is_signer: bool,
#[allow(dead_code)]
is_writable: bool,
executable: bool,
}
@ -1837,7 +1839,9 @@ struct SolSignerSeedC {
/// Rust representation of C's SolSignerSeeds
#[derive(Debug)]
struct SolSignerSeedsC {
#[allow(dead_code)]
addr: u64,
#[allow(dead_code)]
len: u64,
}

View File

@ -235,7 +235,7 @@ impl VoteState {
// utility function, used by Stakes, tests
pub fn to<T: WritableAccount>(versioned: &VoteStateVersions, account: &mut T) -> Option<()> {
Self::serialize(versioned, &mut account.data_as_mut_slice()).ok()
Self::serialize(versioned, account.data_as_mut_slice()).ok()
}
pub fn deserialize(input: &[u8]) -> Result<Self, InstructionError> {