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 std::available_parallelism instead of num_cpus #633

Merged
merged 2 commits into from
May 21, 2022

Conversation

shssoichiro
Copy link
Collaborator

The available_parallelism function was made stable in Rust 1.59. This changeset makes use of it instead of the num_cpus crate. We still have transitive dependencies that use num_cpus, but we should still prefer to use stdlib code when possible.

This changeset also explicitly sets the minimum Rust version to 1.59. This was already the case, as it was required by Edition 2021, but now Cargo will show a helpful error message to users on an old-ish version.

Copy link
Collaborator

@redzic redzic left a comment

Choose a reason for hiding this comment

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

Hopefully we can eventually switch all the dependencies away from num_cpus as well too.

@mergify mergify bot merged commit fe585ac into master-of-zen:master May 21, 2022
@shssoichiro shssoichiro deleted the available-parallelism branch May 21, 2022 08:58
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

2 participants