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

Use more recent Rust features and bump MSRV #64

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

hniksic
Copy link

@hniksic hniksic commented Nov 16, 2023

This PR was inspired by the stabilization of std::sync::OnceLock, which allows this crate to omit the dependency to the once_cell external crate. This seems like a benefit that would justify an MSRV bump. And if we're bumping MSRV anyway, then we can also use usize::BITS and simplify the example using scoped threads.

@hniksic
Copy link
Author

hniksic commented Nov 16, 2023

I've also removed the unreachable module because Rust 1.58 introduced Option::unwrap_unchecked(), Result::unwrap_unchecked(), and Result::unwrap_err_unchecked(). Only Option::unwrap_none_unchecked() is missing, but it was not used by the crate anyway.

If this is undesirable, I'll revert or remove that commit. (The same of course applies to other changes grouped in this PR, which are all in separate commits, and therefore easy to undo.)

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.

None yet

1 participant