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

Returning NonZeroUsize #105

Closed
daxpedda opened this issue Mar 16, 2021 · 3 comments · Fixed by #106
Closed

Returning NonZeroUsize #105

daxpedda opened this issue Mar 16, 2021 · 3 comments · Fixed by #106

Comments

@daxpedda
Copy link
Contributor

Glancing over the code I noticed that get and get_physical always returns at least 1, this isn't documented anywhere as far as I looked.
My proposition would be returning NonZeroUsize instead of usize.

But I believe at least this should be documented.

@seanmonstar
Copy link
Owner

Changing the return type is a breaking change, and probably low value (see #43 for another example). Documenting seems fine, though!

@daxpedda
Copy link
Contributor Author

daxpedda commented Mar 16, 2021

Understandable.
So what is the policy on this, do we keep this issue open for re-evaluation on v2 or close it?

In any case, #106 is ready.

@seanmonstar
Copy link
Owner

I'd probably close. I think that a v2 of num_cpus isn't the end of the world and could be done, but I'd probably hope to see a researched proposal of the changes to make and why for each.

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 a pull request may close this issue.

2 participants