-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Reuse sys::unix::cmath
on other platforms
#84522
Conversation
r? @yaahc (rust-highfive has picked a reviewer for you, use r? to override) |
@@ -1,32 +1,31 @@ | |||
#![cfg(not(test))] | |||
|
|||
use libc::{c_double, c_float}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These functions are used to implement methods of f32
and f64
, so anything else then c_double = f64
and c_float = f32
would be wrong anyway. This makes the file reusable on platforms that don't have libc
available.
This comment has been minimized.
This comment has been minimized.
Everything here looks good to me but I'm not super familiar with the platform abstraction modules yet so I'd like to get a second set of eyes on this before approving. cc @rust-lang/libs |
(Adding myself to the assignees so I won't forget to look at it tomorrow.) |
Looks good to me, other than the above comment. |
Looks like it's good to go then @bors r+ |
📌 Commit 26fb1e3 has been approved by |
Reuse `sys::unix::cmath` on other platforms Reuse `sys::unix::cmath` on all non-`windows` platforms. `unix` is chosen as the canonical location instead of `unsupported` or `common` because `unsupported` doesn't make sense semantically and `common` is reserved for code that is supported on all platforms. Also `unix` is already the home of some non-`windows` code that is technically not exclusive to `unix` like `unix::path`.
☀️ Test successful - checks-actions |
Reuse
sys::unix::cmath
on all non-windows
platforms.unix
is chosen as the canonical location instead ofunsupported
orcommon
becauseunsupported
doesn't make sense semantically andcommon
is reserved for code that is supported on all platforms. Alsounix
is already the home of some non-windows
code that is technically not exclusive tounix
likeunix::path
.