diff --git a/radicle-git-ext/t/src/gen.rs b/radicle-git-ext/t/src/gen.rs index dc86363..3746e45 100644 --- a/radicle-git-ext/t/src/gen.rs +++ b/radicle-git-ext/t/src/gen.rs @@ -3,7 +3,6 @@ use proptest::strategy::Strategy; pub mod commit; -pub mod urn; pub fn alphanumeric() -> impl Strategy { "[a-zA-Z0-9_]+" diff --git a/radicle-git-ext/t/src/gen/urn.rs b/radicle-git-ext/t/src/gen/urn.rs deleted file mode 100644 index 376d304..0000000 --- a/radicle-git-ext/t/src/gen/urn.rs +++ /dev/null @@ -1,16 +0,0 @@ -use proptest::prelude::*; -use radicle_git_ext::Oid; - -/// A proptest strategy that generates [`radicle_git_ext::oid::Oid`] values -/// of the type indicated in parameter `kind` -pub fn gen_oid(kind: git2::ObjectType) -> impl Strategy { - any::>() - .prop_map(move |bytes| git2::Oid::hash_object(kind, &bytes).map(Oid::from).unwrap()) -} - -/// A proptest strategy that generates [`radicle_git_ext::oid::Oid`] values -/// of the type indicated in parameter `kind` or a zeroed `Oid` with -/// equal probability -pub fn gen_oid_with_zero(kind: git2::ObjectType) -> impl Strategy { - prop_oneof![gen_oid(kind), Just(git2::Oid::ZERO_SHA1.into()),] -}