Removes unnecessary default() (#32477)
This commit is contained in:
parent
60130fdd75
commit
3b0e4c8452
|
@ -69,7 +69,7 @@ impl<T: BloomHashIndex> Bloom<T> {
|
|||
keys,
|
||||
bits,
|
||||
num_bits_set: 0,
|
||||
_phantom: PhantomData::default(),
|
||||
_phantom: PhantomData,
|
||||
}
|
||||
}
|
||||
/// Create filter optimal for num size given the `FALSE_RATE`.
|
||||
|
@ -157,7 +157,7 @@ impl<T: BloomHashIndex> From<Bloom<T>> for AtomicBloom<T> {
|
|||
.iter()
|
||||
.map(|&x| AtomicU64::new(x))
|
||||
.collect(),
|
||||
_phantom: PhantomData::default(),
|
||||
_phantom: PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ impl<T: BloomHashIndex> From<AtomicBloom<T>> for Bloom<T> {
|
|||
keys: atomic_bloom.keys,
|
||||
bits,
|
||||
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(),
|
||||
bits: repeat_with(AtomicU64::default).take(size).collect(),
|
||||
popcount: AtomicU64::default(),
|
||||
_phantom: PhantomData::<T>::default(),
|
||||
_phantom: PhantomData::<T>,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -402,7 +402,7 @@ where
|
|||
&SerializableBankAndStorage::<newer::Context> {
|
||||
bank,
|
||||
snapshot_storages,
|
||||
phantom: std::marker::PhantomData::default(),
|
||||
phantom: std::marker::PhantomData,
|
||||
},
|
||||
),
|
||||
}
|
||||
|
@ -424,7 +424,7 @@ where
|
|||
&SerializableBankAndStorageNoExtra::<newer::Context> {
|
||||
bank,
|
||||
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,
|
||||
slot: serializable_bank.bank.rc.slot,
|
||||
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
|
||||
// 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,
|
||||
slot: serializable_bank.bank.rc.slot,
|
||||
account_storage_entries: serializable_bank.snapshot_storages,
|
||||
phantom: std::marker::PhantomData::default(),
|
||||
phantom: std::marker::PhantomData,
|
||||
},
|
||||
)
|
||||
.serialize(serializer)
|
||||
|
|
|
@ -166,7 +166,7 @@ where
|
|||
accounts_db,
|
||||
slot,
|
||||
account_storage_entries,
|
||||
phantom: std::marker::PhantomData::default(),
|
||||
phantom: std::marker::PhantomData,
|
||||
},
|
||||
),
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ pub mod solana_rpc_client {
|
|||
&self,
|
||||
_transaction: &Transaction,
|
||||
) -> ClientResult<Signature> {
|
||||
Ok(Signature::default())
|
||||
Ok(Signature)
|
||||
}
|
||||
|
||||
pub fn get_minimum_balance_for_rent_exemption(
|
||||
|
|
|
@ -58,7 +58,7 @@ where
|
|||
deserializer.deserialize_tuple(
|
||||
(std::mem::size_of::<T>() * 8 + 6) / 7,
|
||||
VarIntVisitor {
|
||||
phantom: PhantomData::default(),
|
||||
phantom: PhantomData,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ impl Keypair {
|
|||
|
||||
/// Constructs a new, random `Keypair` using `OsRng`
|
||||
pub fn new() -> Self {
|
||||
let mut rng = OsRng::default();
|
||||
let mut rng = OsRng;
|
||||
Self::generate(&mut rng)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue