-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Rename FPCategory
, FP*
to FpCategory
, Fp*
to adhere to the naming convention
#19758
Conversation
I guess |
This is a [breaking-change].
This is a [breaking-change].
@brson Rebased. |
Rename `FPCategory`, `FP*` to `FpCategory`, `Fp*` to adhere to the naming convention Reviewed-by: Gankro
@@ -18,7 +18,7 @@ pub use self::SignFormat::*; | |||
|
|||
use char::{mod, Char}; | |||
use kinds::Copy; | |||
use num::{mod, Int, Float, FPNaN, FPInfinite, ToPrimitive}; | |||
use num::{mod, Int, Float, FpNaN, FpInfinite, ToPrimitive}; |
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.
This got a problem! You should rename it to FpNa**n**.
Needs a rebase |
/// "Not a Number", often obtained by dividing by zero | ||
FPNaN, | ||
FpNan, |
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.
Seems to me like the Fp
part of these should be dropped entirely.
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.
@sfackler So it should be FpCategory::Infinite
? That sounds too long IMO.
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.
If using it frequently, you can use FpCategory as Fp
, or just use FpCategory::*
.
@alexcrichton Rebased. |
Ah yes I agree with @sfackler, could the |
@alexcrichton Here you go! |
Rename `FPCategory` to `FpCategory` and `Fp* to `*` in order to adhere to the naming convention This is a [breaking-change]. Existing code like this: ``` use std::num::{FPCategory, FPNaN}; ``` should be adjusted to this: ``` use std::num::FpCategory as Fp ``` In the following code you can use the constants `Fp::Nan`, `Fp::Normal`, etc.
@alexcrichton Rebased after merge failure. |
This is a [breaking-change].