diff --git a/src/lib.rs b/src/lib.rs index d469014..d77e0fe 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -103,13 +103,9 @@ impl Arbitrary for PublicKey { fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy { array::uniform32(any::()) - .prop_filter_map( - "Decompressible Ristretto point", - |b| match PublicKey::try_from(b) { - Ok(public_key) => Some(public_key), - Err(_) => None, - }, - ) + .prop_filter_map("Decompressible Ristretto point", |b| { + PublicKey::try_from(b).ok() + }) .boxed() }