Skip to content

Commit 72afe1e

Browse files
authored
Minor tweaks; prepare v0.10.0-rc.9 (#1736)
@newpavlov this includes a number of what I think are uncontroversial changes from my other PRs and also bumps versions to allow publishing a new pre-release. I'm not committing to keeping rand_pcg in this repo but for now this is the easiest approach (I also wouldn't make changes here until after v0.10).
2 parents 2e6a552 + d5f6525 commit 72afe1e

File tree

11 files changed

+22
-19
lines changed

11 files changed

+22
-19
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ jobs:
1414
- uses: actions/checkout@v6
1515
- uses: rust-lang/crates-io-auth-action@v1
1616
id: auth
17-
- run: cargo publish
17+
- name: Publish rand_pcg
18+
working-directory: ./rand_pcg
19+
run: cargo publish
20+
env:
21+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
22+
- name: Publish rand
23+
run: cargo publish
1824
env:
1925
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rand"
3-
version = "0.10.0-rc.8"
3+
version = "0.10.0-rc.9"
44
authors = ["The Rand Project Developers", "The Rust Project Developers"]
55
license = "MIT OR Apache-2.0"
66
readme = "README.md"
@@ -75,7 +75,7 @@ chacha20 = { version = "0.10.0-rc.10", default-features = false, features = ["rn
7575
getrandom = { version = "0.4.0-rc.1", optional = true }
7676

7777
[dev-dependencies]
78-
rand_pcg = { path = "rand_pcg", version = "0.10.0-rc.1" }
78+
rand_pcg = { path = "rand_pcg", version = "0.10.0-rc.9" }
7979
# Only to test serde
8080
postcard = {version = "1.1.3", default-features = false, features = ["alloc"]}
8181
rayon = "1.7"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ Rand supports limited functionality in `no_std` mode (enabled via
8888
unavailable (unless `sys_rng` is enabled), large parts of `seq` are
8989
unavailable (unless `alloc` is enabled), and `ThreadRng` is unavailable.
9090

91-
## Portability and platform support
91+
## Portability
9292

93-
Many (but not all) algorithms are intended to have reproducible output. Read more in the book: [Portability](https://rust-random.github.io/book/portability.html).
93+
### Reproducibility
9494

95-
The Rand library supports a variety of CPU architectures. Platform integration is outsourced to [getrandom].
95+
Achieving reproducible results requires not only deterministic algorithms with fixed inputs but also a commitment to stability of algorithms and some platform-specific considerations. A subset of `rand` does aim to support reproducibility; read more about this in the book: [Portability](https://rust-random.github.io/book/portability.html).
9696

9797
### WebAssembly support
9898

rand_pcg/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88
### Changes
99
- Use Edition 2024 and MSRV 1.85 (#1653)
10+
- Update to `rand_core` v0.10.0 (#1729)
1011
- Remove feature `os_rng` (#1674)
1112
- Use `postcard` instead of `bincode` to test the serde feature (#1693)
1213

rand_pcg/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_pcg"
3-
version = "0.10.0-rc.7"
3+
version = "0.10.0-rc.9"
44
authors = ["The Rand Project Developers"]
55
license = "MIT OR Apache-2.0"
66
readme = "README.md"

src/distr/bernoulli.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ impl fmt::Display for BernoulliError {
9090
}
9191
}
9292

93-
#[cfg(feature = "std")]
94-
impl std::error::Error for BernoulliError {}
93+
impl core::error::Error for BernoulliError {}
9594

9695
impl Bernoulli {
9796
/// Construct a new `Bernoulli` with the given probability of success `p`.

src/distr/slice.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ impl core::fmt::Display for Empty {
116116
}
117117
}
118118

119-
#[cfg(feature = "std")]
120-
impl std::error::Error for Empty {}
119+
impl core::error::Error for Empty {}
121120

122121
#[cfg(feature = "alloc")]
123122
impl super::SampleString for Choose<'_, char> {

src/distr/uniform.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ impl fmt::Display for Error {
136136
}
137137
}
138138

139-
#[cfg(feature = "std")]
140-
impl std::error::Error for Error {}
139+
impl core::error::Error for Error {}
141140

142141
#[cfg(feature = "serde")]
143142
use serde::{Deserialize, Serialize};

src/distr/weighted/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ pub enum Error {
100100
Overflow,
101101
}
102102

103-
#[cfg(feature = "std")]
104-
impl std::error::Error for Error {}
103+
impl core::error::Error for Error {}
105104

106105
impl fmt::Display for Error {
107106
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

0 commit comments

Comments
 (0)