Skip to content

Commit 242e4bd

Browse files
authored
Use rand 0.9.0; fixes (#58)
1 parent 3508878 commit 242e4bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+123
-179
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- os: ubuntu-latest
4848
target: x86_64-unknown-linux-gnu
4949
variant: MSRV
50-
toolchain: 1.61.0
50+
toolchain: 1.63.0
5151
- os: ubuntu-latest
5252
deps: sudo apt-get update ; sudo apt install gcc-multilib
5353
target: i686-unknown-linux-gnu

.github/workflows/workspace.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,21 @@ on:
44
pull_request:
55
paths-ignore:
66
- README.md
7-
- "benches/**"
87
push:
98
branches: master
109
paths-ignore:
1110
- README.md
12-
- "benches/**"
1311

1412
jobs:
1513
clippy:
16-
runs-on: ubuntu-latest
17-
steps:
18-
- uses: actions/checkout@v4
19-
- uses: dtolnay/rust-toolchain@master
20-
with:
21-
toolchain: 1.78.0
22-
components: clippy
23-
- run: cargo clippy --all --all-targets -- -D warnings
24-
25-
rustfmt:
2614
runs-on: ubuntu-latest
2715
steps:
2816
- uses: actions/checkout@v4
2917
- uses: dtolnay/rust-toolchain@master
3018
with:
3119
toolchain: stable
32-
components: rustfmt
33-
- run: cargo fmt --all -- --check
20+
components: clippy, rustfmt
21+
- name: Clippy
22+
run: cargo clippy --all --all-targets -- -D warnings
23+
- name: Rustfmt
24+
run: cargo fmt --all -- --check

Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,3 @@ exclude = [
1010
"benches",
1111
]
1212
resolver = "2"
13-
14-
[patch.crates-io.rand_core]
15-
git = "https://github.com/rust-random/rand.git"
16-
branch = "master"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Test Status](https://github.com/rust-random/rngs/workflows/Tests/badge.svg?event=push)](https://github.com/rust-random/rngs/actions)
44
[![Book](https://img.shields.io/badge/book-master-yellow.svg)](https://rust-random.github.io/book/)
55
[![API](https://img.shields.io/badge/api-master-yellow.svg)](https://rust-random.github.io/rand)
6-
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.61-lightgray.svg)](https://github.com/rust-random/rngs#rust-version-requirements)
6+
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.63-lightgray.svg)](https://github.com/rust-random/rngs#rust-version-requirements)
77

88
Extra random number generators provided by the Rust Random project.
99
The main repository, [rust-random/rand](https://github.com/rust-random/rand),

benches/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
name = "benches"
33
version = "0.1.0"
44
edition = "2021"
5-
rust-version = "1.61"
5+
rust-version = "1.63"
66
publish = false
77

88
[dev-dependencies]
99
criterion = "0.5.0"
1010
criterion-cycles-per-byte = "0.6"
11-
rand_core = { version = "=0.9.0-alpha.1", features = ["getrandom"] }
12-
rand_xoshiro = { path = "../rand_xoshiro", version = "0.6" }
13-
rand_isaac = { path = "../rand_isaac", version = "0.3" }
14-
rand_xorshift = { path = "../rand_xorshift", version = "0.3" }
15-
rand_hc = { path = "../rand_hc", version = "0.3" }
11+
rand_core = { version = "0.9.0", features = ["os_rng"] }
12+
rand_xoshiro = { path = "../rand_xoshiro", version = "0.7" }
13+
rand_isaac = { path = "../rand_isaac", version = "0.4" }
14+
rand_xorshift = { path = "../rand_xorshift", version = "0.4" }
15+
rand_hc = { path = "../rand_hc", version = "0.4" }
1616

1717
[[bench]]
1818
name = "mod"

rand_hc/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +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.3.3] - unreleased
7+
## [0.4.0] - 2025-01-27
8+
- Bump the MSRV to 1.63 (#58)
9+
- Update to `rand_core` v0.9.0 (#58)
810
- Add examples for initializing the RNGs
911

1012
## [0.3.2] - 2023-04-15

rand_hc/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rand_hc"
3-
version = "0.3.2"
3+
version = "0.4.0"
44
authors = ["The Rand Project Developers"]
55
license = "MIT OR Apache-2.0"
66
readme = "README.md"
@@ -13,7 +13,7 @@ HC128 random number generator
1313
keywords = ["random", "rng", "hc128"]
1414
categories = ["algorithms", "no-std"]
1515
edition = "2021"
16-
rust-version = "1.61"
16+
rust-version = "1.63"
1717

1818
[dependencies]
19-
rand_core = "=0.9.0-alpha.1"
19+
rand_core = "0.9.0"

rand_hc/src/hc128.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ impl RngCore for Hc128Rng {
8989
}
9090
}
9191

92-
rand_core::impl_try_crypto_rng_from_crypto_rng!(Hc128Rng);
93-
9492
impl SeedableRng for Hc128Rng {
9593
type Seed = <Hc128Core as SeedableRng>::Seed;
9694

@@ -100,12 +98,12 @@ impl SeedableRng for Hc128Rng {
10098
}
10199

102100
#[inline]
103-
fn from_rng(rng: impl RngCore) -> Self {
101+
fn from_rng(rng: &mut impl RngCore) -> Self {
104102
Hc128Rng(BlockRng::<Hc128Core>::from_rng(rng))
105103
}
106104

107105
#[inline]
108-
fn try_from_rng<R: TryRngCore>(rng: R) -> Result<Self, R::Error> {
106+
fn try_from_rng<R: TryRngCore>(rng: &mut R) -> Result<Self, R::Error> {
109107
BlockRng::<Hc128Core>::try_from_rng(rng).map(Hc128Rng)
110108
}
111109
}

rand_isaac/CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ 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.3.1] - unreleased
8-
- Correctly document MSRV as 1.36
7+
## [0.4.0] - 2025-01-27
8+
- Bump the MSRV to 1.63 (#58)
9+
- Update to `rand_core` v0.9.0 (#58)
10+
- Rename feature `serde1` to `serde` (#58)
911
- Fix compiler and clippy warnings
1012
- Add examples for initializing the RNGs
1113

rand_isaac/Cargo.toml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rand_isaac"
3-
version = "0.3.0" # NB: When modifying, also modify html_root_url in lib.rs
3+
version = "0.4.0" # NB: When modifying, also modify html_root_url in lib.rs
44
authors = ["The Rand Project Developers", "The Rust Project Developers"]
55
license = "MIT OR Apache-2.0"
66
readme = "README.md"
@@ -13,16 +13,14 @@ ISAAC random number generator
1313
keywords = ["random", "rng", "isaac"]
1414
categories = ["algorithms", "no-std"]
1515
edition = "2021"
16-
rust-version = "1.61"
16+
rust-version = "1.63"
1717

1818
[features]
19-
serde1 = ["serde", "rand_core/serde1"]
19+
serde = ["dep:serde", "rand_core/serde"]
2020

2121
[dependencies]
22-
rand_core = { version = "=0.9.0-alpha.1" }
23-
serde = { version = "1.0.103", features = ["derive"], optional = true }
24-
# Not a direct dependency but required to boost the minimum version:
25-
serde_derive = { version = "1.0.103", optional = true }
22+
rand_core = { version = "0.9.0" }
23+
serde = { version = "1.0.104", features = ["derive"], optional = true }
2624

2725
[dev-dependencies]
2826
# This is for testing serde, unfortunately we can't specify feature-gated dev

0 commit comments

Comments
 (0)