Merge pull request #277 from jonasnick/rand
Remove unused rand dependency
This commit is contained in:
commit
cded694381
|
@ -22,7 +22,6 @@ use-serde = ["serde", "bitcoin_hashes/serde"]
|
|||
[dependencies]
|
||||
bitcoin-bech32 = "0.9.0"
|
||||
byteorder = "1.2"
|
||||
rand = "0.3"
|
||||
bitcoin_hashes = "0.3"
|
||||
bitcoinconsensus = { version = "0.16", optional = true }
|
||||
|
||||
|
|
|
@ -154,13 +154,6 @@ macro_rules! impl_array_newtype {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ::rand::Rand for $thing {
|
||||
#[inline]
|
||||
fn rand<R: ::rand::Rng>(r: &mut R) -> $thing {
|
||||
$thing(::rand::Rand::rand(r))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ extern crate bitcoin_bech32;
|
|||
extern crate bitcoin_hashes;
|
||||
extern crate byteorder;
|
||||
extern crate hex;
|
||||
extern crate rand;
|
||||
extern crate secp256k1;
|
||||
#[cfg(feature = "serde")] extern crate serde;
|
||||
#[cfg(all(test, feature = "serde"))] #[macro_use] extern crate serde_derive; // for 1.22.0 compat
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
//! # Example: creating a new address from a randomly-generated key pair
|
||||
//!
|
||||
//! ```rust
|
||||
//! extern crate rand;
|
||||
//! extern crate secp256k1;
|
||||
//! extern crate bitcoin;
|
||||
//!
|
||||
|
@ -26,7 +25,7 @@
|
|||
//! use bitcoin::util::address::Address;
|
||||
//! use bitcoin::util::key;
|
||||
//! use secp256k1::Secp256k1;
|
||||
//! use rand::thread_rng;
|
||||
//! use secp256k1::rand::thread_rng;
|
||||
//!
|
||||
//! fn main() {
|
||||
//! // Generate random key pair
|
||||
|
|
|
@ -284,7 +284,7 @@ pub fn untemplate(script: &script::Script) -> Result<(Template, Vec<PublicKey>),
|
|||
mod tests {
|
||||
use secp256k1::Secp256k1;
|
||||
use hex::decode as hex_decode;
|
||||
use rand::thread_rng;
|
||||
use secp256k1::rand::thread_rng;
|
||||
use std::str::FromStr;
|
||||
|
||||
use blockdata::script::Script;
|
||||
|
|
|
@ -124,7 +124,7 @@ pub fn signed_msg_hash(msg: &str) -> sha256d::Hash {
|
|||
|
||||
#[cfg(all(test, feature="unstable"))]
|
||||
mod benches {
|
||||
use rand::{Rng, thread_rng};
|
||||
use secp256k1::rand::{Rng, thread_rng};
|
||||
use super::hex_bytes;
|
||||
use test::Bencher;
|
||||
|
||||
|
|
Loading…
Reference in New Issue