Skip to content

Commit d30d4aa

Browse files
committed
Add actual-arbitrary dependency
The actual-arbitrary dependency groups two features, arbitrary and units/arbitrary in the bitcoin crate. Similar functionality can be achieved using the `dep:` syntax, however that violates the crates current MSRV.
1 parent 9462c5d commit d30d4aa

13 files changed

Lines changed: 16 additions & 14 deletions

File tree

bitcoin/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ serde = ["actual-serde", "hashes/serde", "secp256k1/serde", "internals/serde", "
2222
secp-lowmemory = ["secp256k1/lowmemory"]
2323
secp-recovery = ["secp256k1/recovery"]
2424
bitcoinconsensus-std = ["bitcoinconsensus/std", "std"]
25-
arbitrary-units = ["units/arbitrary"]
25+
arbitrary = ["actual-arbitrary", "units/arbitrary"]
2626

2727
[package.metadata.docs.rs]
2828
all-features = true
@@ -46,7 +46,9 @@ bitcoinconsensus = { version = "0.105.0+25.1", default-features = false, optiona
4646

4747
# Do NOT use this as a feature! Use the `serde` feature instead.
4848
actual-serde = { package = "serde", version = "1.0.103", default-features = false, features = [ "derive", "alloc" ], optional = true }
49-
arbitrary = { version = "1.0.1", optional = true }
49+
50+
# Do NOT use this as a feature! Use the `arbitrary` feature instead.
51+
actual-arbitrary = { package = "arbitrary", version = "1.0.1", optional = true }
5052

5153
[dev-dependencies]
5254
serde_json = "1.0.0"

bitcoin/src/bip152.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use core::{convert, fmt, mem};
1010
use std::error;
1111

1212
#[cfg(feature = "arbitrary")]
13-
use arbitrary::{Arbitrary, Unstructured};
13+
use actual_arbitrary::{self as arbitrary, Arbitrary, Unstructured};
1414
use hashes::{sha256, siphash24, Hash};
1515
use internals::impl_array_newtype;
1616
use io::{Read, Write};

bitcoin/src/bip158.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ use core::cmp::{self, Ordering};
4242
use core::fmt::{self, Display, Formatter};
4343

4444
#[cfg(feature = "arbitrary")]
45-
use arbitrary::{Arbitrary, Unstructured};
45+
use actual_arbitrary::{self as arbitrary, Arbitrary, Unstructured};
4646
use hashes::{sha256d, siphash24, Hash};
4747
use internals::write_err;
4848
use io::{Read, Write};

bitcoin/src/blockdata/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use core::fmt;
1212

1313
#[cfg(feature = "arbitrary")]
14-
use arbitrary::{Arbitrary, Unstructured};
14+
use actual_arbitrary::{self as arbitrary, Arbitrary, Unstructured};
1515
use hashes::{sha256d, Hash, HashEngine};
1616
use io::{Read, Write};
1717

bitcoin/src/blockdata/locktime/absolute.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use core::fmt;
1111
use core::str::FromStr;
1212

1313
#[cfg(feature = "arbitrary")]
14-
use arbitrary::{Arbitrary, Unstructured};
14+
use actual_arbitrary::{self as arbitrary, Arbitrary, Unstructured};
1515
use io::{Read, Write};
1616
#[cfg(all(test, mutate))]
1717
use mutagen::mutate;

bitcoin/src/blockdata/script/owned.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use core::ops::Deref;
55

66
#[cfg(feature = "arbitrary")]
7-
use arbitrary::{Arbitrary, Unstructured};
7+
use actual_arbitrary::{self as arbitrary, Arbitrary, Unstructured};
88
use hex::FromHex;
99
use secp256k1::{Secp256k1, Verification};
1010

bitcoin/src/blockdata/transaction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ use crate::{Amount, SignedAmount, VarInt};
3939
pub use crate::consensus::validation::TxVerifyError;
4040

4141
#[cfg(feature = "arbitrary")]
42-
use arbitrary::{Arbitrary, Unstructured};
42+
use actual_arbitrary::{self as arbitrary, Arbitrary, Unstructured};
4343

4444
hashes::hash_newtype! {
4545
/// A bitcoin transaction hash/transaction ID.

bitcoin/src/blockdata/witness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use core::fmt;
99
use core::ops::Index;
1010

1111
#[cfg(feature = "arbitrary")]
12-
use arbitrary::{Arbitrary, Unstructured};
12+
use actual_arbitrary::{self as arbitrary, Arbitrary, Unstructured};
1313
use io::{Read, Write};
1414

1515
use crate::consensus::encode::{Error, MAX_VEC_SIZE};

bitcoin/src/crypto/ecdsa.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use core::str::FromStr;
88
use core::{fmt, iter};
99

1010
#[cfg(feature = "arbitrary")]
11-
use arbitrary::{Arbitrary, Unstructured};
11+
use actual_arbitrary::{self as arbitrary, Arbitrary, Unstructured};
1212
use hex::FromHex;
1313
use internals::write_err;
1414
use io::Write;

bitcoin/src/crypto/sighash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use core::{fmt, str};
1515

1616
#[cfg(feature = "arbitrary")]
17-
use arbitrary::{Arbitrary, Unstructured};
17+
use actual_arbitrary::{self as arbitrary, Arbitrary, Unstructured};
1818
use hashes::{hash_newtype, sha256, sha256d, sha256t_hash_newtype, Hash};
1919
use internals::write_err;
2020
use io::Write;

0 commit comments

Comments
 (0)