Skip to content

Commit 7a23f3e

Browse files
authored
Merge pull request #546 from dhardy/0.5
Prepare 0.5.4 release
2 parents 600bc55 + 023901b commit 7a23f3e

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ A [separate changelog is kept for rand_core](rand_core/CHANGELOG.md).
88

99
You may also find the [Update Guide](UPDATING.md) useful.
1010

11+
## [0.5.4] - 2018-07-11
12+
### Platform support
13+
- Make `OsRng` work via WASM/stdweb for WebWorkers
14+
1115
## [0.5.3] - 2018-06-26
1216
### Platform support
1317
- OpenBSD, Bitrig: fix compilation (broken in 0.5.1) (#530)

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rand"
3-
version = "0.5.3" # NB: When modifying, also modify html_root_url in lib.rs
3+
version = "0.5.4" # NB: When modifying, also modify html_root_url in lib.rs
44
authors = ["The Rust Project Developers"]
55
license = "MIT/Apache-2.0"
66
readme = "README.md"

src/distributions/other.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ impl<T> Distribution<Wrapping<T>> for Standard where Standard: Distribution<T> {
174174
mod tests {
175175
use {Rng, RngCore, Standard};
176176
use distributions::Alphanumeric;
177-
#[cfg(all(not(feature="std"), feature="alloc"))] use alloc::String;
177+
#[cfg(all(not(feature="std"), feature="alloc"))] use alloc::string::String;
178178

179179
#[test]
180180
fn test_misc() {

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223

224224
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
225225
html_favicon_url = "https://www.rust-lang.org/favicon.ico",
226-
html_root_url = "https://docs.rs/rand/0.5.3")]
226+
html_root_url = "https://docs.rs/rand/0.5.4")]
227227

228228
#![deny(missing_docs)]
229229
#![deny(missing_debug_implementations)]

src/seq.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@
1313
use super::Rng;
1414

1515
// This crate is only enabled when either std or alloc is available.
16+
#[cfg(all(feature="alloc", not(feature="std")))] use alloc::vec::Vec;
1617
// BTreeMap is not as fast in tests, but better than nothing.
1718
#[cfg(feature="std")] use std::collections::HashMap;
18-
#[cfg(not(feature="std"))] use alloc::btree_map::BTreeMap;
19-
20-
#[cfg(not(feature="std"))] use alloc::Vec;
19+
#[cfg(all(feature="alloc", not(feature="std")))] use alloc::collections::BTreeMap;
2120

2221
/// Randomly sample `amount` elements from a finite iterator.
2322
///
@@ -227,7 +226,7 @@ mod test {
227226
use super::*;
228227
use {XorShiftRng, Rng, SeedableRng};
229228
#[cfg(not(feature="std"))]
230-
use alloc::Vec;
229+
use alloc::vec::Vec;
231230

232231
#[test]
233232
fn test_sample_iter() {

0 commit comments

Comments
 (0)