Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rand_jitter v0.4, platform_ns_time feature, MSRV=1.51, rustfmt #47

Merged
merged 8 commits into from
Dec 8, 2023

Conversation

dhardy
Copy link
Member

@dhardy dhardy commented Nov 20, 2023

Fixes #16. Hacky since it requires a nightly feature. I did try RPIT (return-position impl trait) but rustc still wants a type specification in the test. RPIT does work; Rust was complaining about the (unused) type parameter F on the impl block.

Fixes #46: I will release after this is merged.

Apply rustfmt and Clippy to rand_jitter.

Bump MSRV to 1.51 for rand_jitter and use this version for testing all repo crates. I expect we'll see new versions of rand_core and RNGs with a newer MSRV anyway soon(ish) since the Rand repo is already requiring Rust 1.60.

@dhardy dhardy requested a review from vks November 20, 2023 12:15
@dhardy
Copy link
Member Author

dhardy commented Nov 20, 2023

Rebased; no longer uses type_alias_impl_trait

Copy link
Contributor

@vks vks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I only had a minor suggestion. 🙂

@@ -9,6 +9,7 @@ documentation = "https://docs.rs/rand_jitter"
description = "Random number generator based on timing jitter"
keywords = ["random", "rng", "os"]
edition = "2018"
rust-version = "1.51"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great to add this to the other Cargo.toml files as well. I'm not sure whether Cargo shipped with Rust 1.36 supports this, but for the other crates it should work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That can happen when these get updated... they will need an MSRV update for the next rand_core anyway.

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected] # older versions may work (untested)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think 1.36 should work for them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd have to pin older versions of dependencies (see failure). Doesn't seem worth it.

@dhardy dhardy merged commit ac0cf3c into rust-random:master Dec 8, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Current versions of rand_jitter and rand on crates.io are incompatible Fix JitterRng::new
2 participants