Remove unused rand dependency
This commit is contained in:
parent
860e74ecb5
commit
94fba3aa88
|
@ -23,7 +23,6 @@ use-serde = ["serde", "bitcoin_hashes/serde"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitcoin-bech32 = "0.9.0"
|
bitcoin-bech32 = "0.9.0"
|
||||||
byteorder = "1.2"
|
byteorder = "1.2"
|
||||||
rand = "0.3"
|
|
||||||
bitcoin_hashes = "0.3"
|
bitcoin_hashes = "0.3"
|
||||||
bitcoinconsensus = { version = "0.16", optional = true }
|
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 bitcoin_hashes;
|
||||||
extern crate byteorder;
|
extern crate byteorder;
|
||||||
extern crate hex;
|
extern crate hex;
|
||||||
extern crate rand;
|
|
||||||
extern crate secp256k1;
|
extern crate secp256k1;
|
||||||
#[cfg(feature = "serde")] extern crate serde;
|
#[cfg(feature = "serde")] extern crate serde;
|
||||||
#[cfg(feature = "strason")] extern crate strason;
|
#[cfg(feature = "strason")] extern crate strason;
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
//! # Example: creating a new address from a randomly-generated key pair
|
//! # Example: creating a new address from a randomly-generated key pair
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! extern crate rand;
|
|
||||||
//! extern crate secp256k1;
|
//! extern crate secp256k1;
|
||||||
//! extern crate bitcoin;
|
//! extern crate bitcoin;
|
||||||
//!
|
//!
|
||||||
|
@ -26,7 +25,7 @@
|
||||||
//! use bitcoin::util::address::Address;
|
//! use bitcoin::util::address::Address;
|
||||||
//! use bitcoin::util::key;
|
//! use bitcoin::util::key;
|
||||||
//! use secp256k1::Secp256k1;
|
//! use secp256k1::Secp256k1;
|
||||||
//! use rand::thread_rng;
|
//! use secp256k1::rand::thread_rng;
|
||||||
//!
|
//!
|
||||||
//! fn main() {
|
//! fn main() {
|
||||||
//! // Generate random key pair
|
//! // Generate random key pair
|
||||||
|
|
|
@ -284,7 +284,7 @@ pub fn untemplate(script: &script::Script) -> Result<(Template, Vec<PublicKey>),
|
||||||
mod tests {
|
mod tests {
|
||||||
use secp256k1::Secp256k1;
|
use secp256k1::Secp256k1;
|
||||||
use hex::decode as hex_decode;
|
use hex::decode as hex_decode;
|
||||||
use rand::thread_rng;
|
use secp256k1::rand::thread_rng;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
use blockdata::script::Script;
|
use blockdata::script::Script;
|
||||||
|
|
|
@ -124,7 +124,7 @@ pub fn signed_msg_hash(msg: &str) -> sha256d::Hash {
|
||||||
|
|
||||||
#[cfg(all(test, feature="unstable"))]
|
#[cfg(all(test, feature="unstable"))]
|
||||||
mod benches {
|
mod benches {
|
||||||
use rand::{Rng, thread_rng};
|
use secp256k1::rand::{Rng, thread_rng};
|
||||||
use super::hex_bytes;
|
use super::hex_bytes;
|
||||||
use test::Bencher;
|
use test::Bencher;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue