Skip to content

Commit 974bed5

Browse files
committed
Implement compatibility shim around rand_core 0.5
1 parent 8112daa commit 974bed5

File tree

10 files changed

+118
-621
lines changed

10 files changed

+118
-621
lines changed

.travis.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ matrix:
6666
# TODO: add simd_support feature:
6767
- cargo test --features=serde1,log
6868
- cargo test --examples
69-
- cargo test --manifest-path rand_core/Cargo.toml
70-
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features
69+
- cargo test --manifest-path rand_core/Cargo.toml --tests
70+
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features --tests
7171
- cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
7272
# TODO: cannot test rand_pcg due to explicit dependency on i128
7373
- cargo test --manifest-path rand_xorshift/Cargo.toml --features=serde1
@@ -88,8 +88,8 @@ matrix:
8888
# TODO: add simd_support feature:
8989
- cargo test --features=serde1,log
9090
- cargo test --examples
91-
- cargo test --manifest-path rand_core/Cargo.toml
92-
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features
91+
- cargo test --manifest-path rand_core/Cargo.toml --tests
92+
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features --tests
9393
- cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
9494
- cargo test --manifest-path rand_pcg/Cargo.toml --features=serde1
9595
- cargo test --manifest-path rand_xorshift/Cargo.toml --features=serde1
@@ -116,8 +116,8 @@ matrix:
116116
- cargo test --all-features
117117
- cargo test --benches --features=nightly
118118
- cargo test --examples
119-
- cargo test --manifest-path rand_core/Cargo.toml
120-
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features --features=alloc
119+
- cargo test --manifest-path rand_core/Cargo.toml --tests
120+
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features --features=alloc --tests
121121
- cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
122122
- cargo test --manifest-path rand_pcg/Cargo.toml --features=serde1
123123
- cargo test --manifest-path rand_xorshift/Cargo.toml --features=serde1
@@ -209,8 +209,8 @@ script:
209209
# TODO: add simd_support feature:
210210
- cargo test --features=serde1,log
211211
- cargo test --examples
212-
- cargo test --manifest-path rand_core/Cargo.toml
213-
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features
212+
- cargo test --manifest-path rand_core/Cargo.toml --tests
213+
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features --tests
214214
- cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
215215
- cargo test --manifest-path rand_pcg/Cargo.toml --features=serde1
216216
- cargo test --manifest-path rand_xorshift/Cargo.toml --features=serde1

Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,3 @@ autocfg = "0.1"
8282

8383
[package.metadata.docs.rs]
8484
all-features = true
85-
86-
[patch.crates-io]
87-
rand_core = { path = "rand_core", version = "0.4" }

appveyor.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ test_script:
3737
- cargo test --features=serde1,log
3838
- cargo test --benches --features=nightly
3939
- cargo test --examples
40-
- cargo test --manifest-path rand_core/Cargo.toml
41-
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features --features=alloc
40+
- cargo test --manifest-path rand_core/Cargo.toml --tests
41+
- cargo test --manifest-path rand_core/Cargo.toml --no-default-features --features=alloc --tests
4242
- cargo test --manifest-path rand_isaac/Cargo.toml --features=serde1
4343
- cargo test --manifest-path rand_pcg/Cargo.toml --features=serde1
4444
- cargo test --manifest-path rand_xorshift/Cargo.toml --features=serde1

rand_core/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.4.2] - 2019-06-??
8+
- Compatibility shim around version 0.5
9+
710
## [0.4.0] - 2019-01-24
811
- Disable the `std` feature by default (#702)
912

rand_core/Cargo.toml

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rand_core"
3-
version = "0.4.0"
3+
version = "0.4.2"
44
authors = ["The Rand Project Developers", "The Rust Project Developers"]
55
license = "MIT/Apache-2.0"
66
readme = "README.md"
@@ -18,10 +18,9 @@ travis-ci = { repository = "rust-random/rand" }
1818
appveyor = { repository = "rust-random/rand" }
1919

2020
[features]
21-
std = ["alloc"] # use std library; should be default but for above bug
22-
alloc = [] # enables Vec and Box support without std
23-
serde1 = ["serde", "serde_derive"] # enables serde for BlockRng wrapper
21+
std = ["rand_core/std"] # use std library; should be default but for above bug
22+
alloc = ["rand_core/alloc"] # enables Vec and Box support without std
23+
serde1 = ["rand_core/serde1"] # enables serde for BlockRng wrapper
2424

2525
[dependencies]
26-
serde = { version = "1", optional = true }
27-
serde_derive = { version = "^1.0.38", optional = true }
26+
rand_core = { version = "0.5" }

0 commit comments

Comments
 (0)