mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 09:57:56 +00:00
Remove implementation of Randomness for () (#6959)
This commit is contained in:
@@ -1345,7 +1345,10 @@ pub trait Randomness<Output> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<Output: Decode + Default> Randomness<Output> for () {
|
||||
/// Provides an implementation of [`Randomness`] that should only be used in tests!
|
||||
pub struct TestRandomness;
|
||||
|
||||
impl<Output: Decode + Default> Randomness<Output> for TestRandomness {
|
||||
fn random(subject: &[u8]) -> Output {
|
||||
Output::decode(&mut TrailingZeroInput::new(subject)).unwrap_or_default()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user