Skip to content

Commit

Permalink
types: fix Arbitrary impl for Identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwill committed Dec 4, 2024
1 parent 6918fd8 commit ae27938
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/sui-sdk-types/src/types/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ pub struct MovePackage {
serde(with = "::serde_with::As::<BTreeMap<::serde_with::Same, ::serde_with::Bytes>>")
)]
#[cfg_attr(
test,
feature = "proptest",
strategy(
proptest::collection::btree_map(proptest::arbitrary::any::<Identifier>(), proptest::collection::vec(proptest::arbitrary::any::<u8>(), 0..=1024), 0..=5)
)
Expand All @@ -142,7 +142,7 @@ pub struct MovePackage {
// For each dependency, maps original package ID to the info about the (upgraded) dependency
// version that this package is using
#[cfg_attr(
test,
feature = "proptest",
strategy(
proptest::collection::btree_map(proptest::arbitrary::any::<ObjectId>(), proptest::arbitrary::any::<UpgradeInfo>(), 0..=5)
)
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-sdk-types/src/types/type_tag/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl std::error::Error for TypeParseError {}
#[cfg_attr(feature = "proptest", derive(test_strategy::Arbitrary))]
pub struct Identifier(
#[cfg_attr(
test,
feature = "proptest",
strategy(proptest::strategy::Strategy::prop_map(
"[a-zA-Z][a-zA-Z0-9_]{0,127}",
Into::into
Expand Down

0 comments on commit ae27938

Please sign in to comment.