Removes unnecessary default() (#32477)
This commit is contained in:
parent
60130fdd75
commit
3b0e4c8452
|
@ -69,7 +69,7 @@ impl<T: BloomHashIndex> Bloom<T> {
|
||||||
keys,
|
keys,
|
||||||
bits,
|
bits,
|
||||||
num_bits_set: 0,
|
num_bits_set: 0,
|
||||||
_phantom: PhantomData::default(),
|
_phantom: PhantomData,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// Create filter optimal for num size given the `FALSE_RATE`.
|
/// Create filter optimal for num size given the `FALSE_RATE`.
|
||||||
|
@ -157,7 +157,7 @@ impl<T: BloomHashIndex> From<Bloom<T>> for AtomicBloom<T> {
|
||||||
.iter()
|
.iter()
|
||||||
.map(|&x| AtomicU64::new(x))
|
.map(|&x| AtomicU64::new(x))
|
||||||
.collect(),
|
.collect(),
|
||||||
_phantom: PhantomData::default(),
|
_phantom: PhantomData,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -215,7 +215,7 @@ impl<T: BloomHashIndex> From<AtomicBloom<T>> for Bloom<T> {
|
||||||
keys: atomic_bloom.keys,
|
keys: atomic_bloom.keys,
|
||||||
bits,
|
bits,
|
||||||
num_bits_set,
|
num_bits_set,
|
||||||
_phantom: PhantomData::default(),
|
_phantom: PhantomData,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ impl<const K: usize, T: ?Sized + Hash> Deduper<K, T> {
|
||||||
clock: Instant::now(),
|
clock: Instant::now(),
|
||||||
bits: repeat_with(AtomicU64::default).take(size).collect(),
|
bits: repeat_with(AtomicU64::default).take(size).collect(),
|
||||||
popcount: AtomicU64::default(),
|
popcount: AtomicU64::default(),
|
||||||
_phantom: PhantomData::<T>::default(),
|
_phantom: PhantomData::<T>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -402,7 +402,7 @@ where
|
||||||
&SerializableBankAndStorage::<newer::Context> {
|
&SerializableBankAndStorage::<newer::Context> {
|
||||||
bank,
|
bank,
|
||||||
snapshot_storages,
|
snapshot_storages,
|
||||||
phantom: std::marker::PhantomData::default(),
|
phantom: std::marker::PhantomData,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
@ -424,7 +424,7 @@ where
|
||||||
&SerializableBankAndStorageNoExtra::<newer::Context> {
|
&SerializableBankAndStorageNoExtra::<newer::Context> {
|
||||||
bank,
|
bank,
|
||||||
snapshot_storages,
|
snapshot_storages,
|
||||||
phantom: std::marker::PhantomData::default(),
|
phantom: std::marker::PhantomData,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,7 +211,7 @@ impl<'a> TypeContext<'a> for Context {
|
||||||
accounts_db: &serializable_bank.bank.rc.accounts.accounts_db,
|
accounts_db: &serializable_bank.bank.rc.accounts.accounts_db,
|
||||||
slot: serializable_bank.bank.rc.slot,
|
slot: serializable_bank.bank.rc.slot,
|
||||||
account_storage_entries: serializable_bank.snapshot_storages,
|
account_storage_entries: serializable_bank.snapshot_storages,
|
||||||
phantom: std::marker::PhantomData::default(),
|
phantom: std::marker::PhantomData,
|
||||||
},
|
},
|
||||||
// Additional fields, we manually store the lamps per signature here so that
|
// Additional fields, we manually store the lamps per signature here so that
|
||||||
// we can grab it on restart.
|
// we can grab it on restart.
|
||||||
|
@ -245,7 +245,7 @@ impl<'a> TypeContext<'a> for Context {
|
||||||
accounts_db: &serializable_bank.bank.rc.accounts.accounts_db,
|
accounts_db: &serializable_bank.bank.rc.accounts.accounts_db,
|
||||||
slot: serializable_bank.bank.rc.slot,
|
slot: serializable_bank.bank.rc.slot,
|
||||||
account_storage_entries: serializable_bank.snapshot_storages,
|
account_storage_entries: serializable_bank.snapshot_storages,
|
||||||
phantom: std::marker::PhantomData::default(),
|
phantom: std::marker::PhantomData,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.serialize(serializer)
|
.serialize(serializer)
|
||||||
|
|
|
@ -166,7 +166,7 @@ where
|
||||||
accounts_db,
|
accounts_db,
|
||||||
slot,
|
slot,
|
||||||
account_storage_entries,
|
account_storage_entries,
|
||||||
phantom: std::marker::PhantomData::default(),
|
phantom: std::marker::PhantomData,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ pub mod solana_rpc_client {
|
||||||
&self,
|
&self,
|
||||||
_transaction: &Transaction,
|
_transaction: &Transaction,
|
||||||
) -> ClientResult<Signature> {
|
) -> ClientResult<Signature> {
|
||||||
Ok(Signature::default())
|
Ok(Signature)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_minimum_balance_for_rent_exemption(
|
pub fn get_minimum_balance_for_rent_exemption(
|
||||||
|
|
|
@ -58,7 +58,7 @@ where
|
||||||
deserializer.deserialize_tuple(
|
deserializer.deserialize_tuple(
|
||||||
(std::mem::size_of::<T>() * 8 + 6) / 7,
|
(std::mem::size_of::<T>() * 8 + 6) / 7,
|
||||||
VarIntVisitor {
|
VarIntVisitor {
|
||||||
phantom: PhantomData::default(),
|
phantom: PhantomData,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ impl Keypair {
|
||||||
|
|
||||||
/// Constructs a new, random `Keypair` using `OsRng`
|
/// Constructs a new, random `Keypair` using `OsRng`
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
let mut rng = OsRng::default();
|
let mut rng = OsRng;
|
||||||
Self::generate(&mut rng)
|
Self::generate(&mut rng)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue