peer_id: make quickcheck optional but default feature

This commit is contained in:
Joakim Frostegård 2023-06-14 09:49:05 +02:00
parent bbfe54670a
commit 32aa34366c
2 changed files with 6 additions and 1 deletions

View file

@ -195,6 +195,7 @@ impl Display for PeerClient {
}
}
#[cfg(feature = "quickcheck")]
impl quickcheck::Arbitrary for PeerId {
fn arbitrary(g: &mut quickcheck::Gen) -> Self {
let mut bytes = [0u8; 20];
@ -207,6 +208,7 @@ impl quickcheck::Arbitrary for PeerId {
}
}
#[cfg(feature = "quickcheck")]
#[cfg(test)]
mod tests {
use super::*;