Skip to content

Commit 1e9f990

Browse files
niklasad1dvdplm
authored andcommitted
update rand to 0.7 (breaking change) (#217)
* update rand to 0.7 (breaking change) * [kvdb-rocksdb]: revert version bump * [keccak-hash]: bump version * [contract-address]: bump keccak-hash * [contract-address]: bump version `0.3.0` * [rlp]: downgrade to 0.2
1 parent f884d77 commit 1e9f990

File tree

13 files changed

+40
-33
lines changed

13 files changed

+40
-33
lines changed

contract-address/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "contract-address"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
authors = ["Parity Technologies <[email protected]>"]
55
license = "MIT"
66
homepage = "https://github.com/paritytech/parity-common"
@@ -11,9 +11,9 @@ edition = "2018"
1111
readme = "README.md"
1212

1313
[dependencies]
14-
ethereum-types = { version = "0.7", path = "../ethereum-types" }
14+
ethereum-types = { version = "0.8", path = "../ethereum-types" }
1515
rlp = { version = "0.4", path = "../rlp" }
16-
keccak-hash = { version = "0.3", path = "../keccak-hash", default-features = false }
16+
keccak-hash = { version = "0.4", path = "../keccak-hash", default-features = false }
1717

1818
[features]
1919
default = []

ethbloom/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ethbloom"
3-
version = "0.7.0"
3+
version = "0.8.0"
44
authors = ["Parity Technologies <[email protected]>"]
55
description = "Ethereum bloom filter"
66
license = "MIT"
@@ -12,7 +12,7 @@ edition = "2018"
1212
[dependencies]
1313
tiny-keccak = "1.5"
1414
crunchy = { version = "0.2", default-features = false, features = ["limit_256"] }
15-
fixed-hash = { path = "../fixed-hash", version = "0.4", default-features = false }
15+
fixed-hash = { path = "../fixed-hash", version = "0.5", default-features = false }
1616
impl-serde = { path = "../primitive-types/impls/serde", version = "0.2", default-features = false, optional = true }
1717
impl-rlp = { path = "../primitive-types/impls/rlp", version = "0.2", default-features = false }
1818

ethereum-types/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
[package]
22
name = "ethereum-types"
3-
version = "0.7.0"
3+
version = "0.8.0"
44
authors = ["Parity Technologies <[email protected]>"]
55
license = "MIT"
66
homepage = "https://github.com/paritytech/parity-common"
77
description = "Ethereum types"
88
edition = "2018"
99

1010
[dependencies]
11-
ethbloom = { path = "../ethbloom", version = "0.7", default-features = false }
12-
fixed-hash = { path = "../fixed-hash", version = "0.4", default-features = false, features = ["byteorder", "rustc-hex"] }
11+
ethbloom = { path = "../ethbloom", version = "0.8", default-features = false }
12+
fixed-hash = { path = "../fixed-hash", version = "0.5", default-features = false, features = ["byteorder", "rustc-hex"] }
1313
uint-crate = { path = "../uint", package = "uint", version = "0.8", default-features = false }
14-
primitive-types = { path = "../primitive-types", version = "0.5", features = ["rlp", "byteorder", "rustc-hex"], default-features = false }
14+
primitive-types = { path = "../primitive-types", version = "0.6", features = ["rlp", "byteorder", "rustc-hex"], default-features = false }
1515
impl-serde = { path = "../primitive-types/impls/serde", version = "0.2", default-features = false, optional = true }
1616
impl-rlp = { path = "../primitive-types/impls/rlp", version = "0.2", default-features = false }
1717

fixed-hash/Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "fixed-hash"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
authors = ["Parity Technologies <[email protected]>"]
55
license = "MIT"
66
homepage = "https://github.com/paritytech/parity-common"
@@ -13,12 +13,15 @@ readme = "README.md"
1313
features = ["quickcheck", "api-dummy"]
1414

1515
[dependencies]
16-
rand = { version = "0.5", optional = true, default-features = false }
16+
rand = { version = "0.7", optional = true, default-features = false }
1717
rustc-hex = { version = "2.0", optional = true, default-features = false }
1818
quickcheck = { version = "0.7", optional = true }
1919
byteorder = { version = "1.2", optional = true, default-features = false }
2020
static_assertions = "0.2"
2121

22+
[dev-dependencies]
23+
rand_xorshift = "0.2.0"
24+
2225
[target.'cfg(not(target_os = "unknown"))'.dependencies]
2326
libc = { version = "0.2", optional = true, default-features = false }
2427

fixed-hash/src/hash.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ macro_rules! construct_fixed_hash {
6767

6868
impl<'a> From<&'a [u8; $n_bytes]> for $name {
6969
/// Constructs a hash type from the given reference
70-
/// to the bytes array of fixed length.
70+
/// to the bytes array of fixed length.
7171
///
7272
/// # Note
7373
///
@@ -80,7 +80,7 @@ macro_rules! construct_fixed_hash {
8080

8181
impl<'a> From<&'a mut [u8; $n_bytes]> for $name {
8282
/// Constructs a hash type from the given reference
83-
/// to the mutable bytes array of fixed length.
83+
/// to the mutable bytes array of fixed length.
8484
///
8585
/// # Note
8686
///
@@ -328,7 +328,7 @@ macro_rules! construct_fixed_hash {
328328
}
329329

330330
// Implementation for disabled byteorder crate support.
331-
//
331+
//
332332
// # Note
333333
//
334334
// Feature guarded macro definitions instead of feature guarded impl blocks
@@ -342,7 +342,7 @@ macro_rules! impl_byteorder_for_fixed_hash {
342342
}
343343

344344
// Implementation for enabled byteorder crate support.
345-
//
345+
//
346346
// # Note
347347
//
348348
// Feature guarded macro definitions instead of feature guarded impl blocks
@@ -461,7 +461,7 @@ macro_rules! impl_byteorder_for_fixed_hash {
461461
}
462462

463463
// Implementation for disabled rand crate support.
464-
//
464+
//
465465
// # Note
466466
//
467467
// Feature guarded macro definitions instead of feature guarded impl blocks
@@ -475,7 +475,7 @@ macro_rules! impl_rand_for_fixed_hash {
475475
}
476476

477477
// Implementation for enabled rand crate support.
478-
//
478+
//
479479
// # Note
480480
//
481481
// Feature guarded macro definitions instead of feature guarded impl blocks
@@ -512,7 +512,7 @@ macro_rules! impl_rand_for_fixed_hash {
512512

513513
/// Assign `self` to a cryptographically random value.
514514
pub fn randomize(&mut self) {
515-
let mut rng = $crate::rand::rngs::EntropyRng::new();
515+
let mut rng = $crate::rand::rngs::OsRng;
516516
self.randomize_using(&mut rng);
517517
}
518518

@@ -538,7 +538,7 @@ macro_rules! impl_rand_for_fixed_hash {
538538
}
539539

540540
// Implementation for disabled libc crate support.
541-
//
541+
//
542542
// # Note
543543
//
544544
// Feature guarded macro definitions instead of feature guarded impl blocks
@@ -566,7 +566,7 @@ macro_rules! impl_libc_for_fixed_hash {
566566
}
567567

568568
// Implementation for enabled libc crate support.
569-
//
569+
//
570570
// # Note
571571
//
572572
// Feature guarded macro definitions instead of feature guarded impl blocks
@@ -612,7 +612,7 @@ macro_rules! impl_libc_for_fixed_hash {
612612
}
613613

614614
// Implementation for disabled rustc-hex crate support.
615-
//
615+
//
616616
// # Note
617617
//
618618
// Feature guarded macro definitions instead of feature guarded impl blocks
@@ -626,7 +626,7 @@ macro_rules! impl_rustc_hex_for_fixed_hash {
626626
}
627627

628628
// Implementation for enabled rustc-hex crate support.
629-
//
629+
//
630630
// # Note
631631
//
632632
// Feature guarded macro definitions instead of feature guarded impl blocks
@@ -667,7 +667,7 @@ macro_rules! impl_rustc_hex_for_fixed_hash {
667667
}
668668

669669
// Implementation for disabled quickcheck crate support.
670-
//
670+
//
671671
// # Note
672672
//
673673
// Feature guarded macro definitions instead of feature guarded impl blocks
@@ -681,7 +681,7 @@ macro_rules! impl_quickcheck_for_fixed_hash {
681681
}
682682

683683
// Implementation for enabled quickcheck crate support.
684-
//
684+
//
685685
// # Note
686686
//
687687
// Feature guarded macro definitions instead of feature guarded impl blocks

fixed-hash/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ pub extern crate rand;
5656
#[doc(hidden)]
5757
pub extern crate quickcheck;
5858

59+
#[cfg(test)]
60+
extern crate rand_xorshift;
61+
5962
#[macro_use]
6063
mod hash;
6164

fixed-hash/src/tests.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ mod from_low_u64 {
250250
#[cfg(feature = "rand")]
251251
mod rand {
252252
use super::*;
253-
use rand::{SeedableRng, XorShiftRng};
253+
use rand::SeedableRng;
254+
use rand_xorshift::XorShiftRng;
254255

255256
#[test]
256257
fn random() {

keccak-hash/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "keccak-hash"
3-
version = "0.3.0"
3+
version = "0.4.0"
44
description = "`keccak-hash` is a set of utility functions to facilitate working with Keccak hashes (256/512 bits long)."
55
authors = ["Parity Technologies <[email protected]>"]
66
repository = "https://github.com/paritytech/parity-common"
@@ -10,7 +10,7 @@ edition = "2018"
1010

1111
[dependencies]
1212
tiny-keccak = "1.4"
13-
primitive-types = { path = "../primitive-types", version = "0.5", default-features = false }
13+
primitive-types = { path = "../primitive-types", version = "0.6", default-features = false }
1414

1515
[dev-dependencies]
1616
tempdir = "0.3"

kvdb-rocksdb/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ parity-rocksdb = "0.5"
2020

2121
[dev-dependencies]
2222
tempdir = "0.3"
23-
ethereum-types = { version = "0.7", path = "../ethereum-types" }
23+
ethereum-types = { version = "0.8", path = "../ethereum-types" }

primitive-types/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[package]
22
name = "primitive-types"
3-
version = "0.5.1"
3+
version = "0.6.0"
44
authors = ["Parity Technologies <[email protected]>"]
55
license = "Apache-2.0/MIT"
66
homepage = "https://github.com/paritytech/parity-common"
77
description = "Primitive types shared by Ethereum and Substrate"
88

99
[dependencies]
10-
fixed-hash = { version = "0.4", path = "../fixed-hash", default-features = false }
10+
fixed-hash = { version = "0.5", path = "../fixed-hash", default-features = false }
1111
uint = { version = "0.8", path = "../uint", default-features = false }
1212
impl-serde = { version = "0.2.1", path = "impls/serde", default-features = false, optional = true }
1313
impl-codec = { version = "0.4.1", path = "impls/codec", default-features = false, optional = true }

0 commit comments

Comments
 (0)