Skip to content

Conversation

@tbu-
Copy link
Contributor

@tbu- tbu- commented Dec 11, 2014

This is a [breaking-change].

@lifthrasiir
Copy link
Contributor

I guess FpCategory is also a good target for enum namespacing.

brson added a commit to brson/rust that referenced this pull request Dec 12, 2014
brson added a commit to brson/rust that referenced this pull request Dec 13, 2014
@tbu-
Copy link
Contributor Author

tbu- commented Dec 18, 2014

@brson Rebased.

bors added a commit that referenced this pull request Dec 19, 2014
Rename `FPCategory`, `FP*` to `FpCategory`, `Fp*` to adhere to the naming convention

Reviewed-by: Gankro
Copy link
Contributor

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**.

@alexcrichton
Copy link
Member

Needs a rebase

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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::*.

@tbu-
Copy link
Contributor Author

tbu- commented Dec 22, 2014

@alexcrichton Rebased.

@alexcrichton
Copy link
Member

Ah yes I agree with @sfackler, could the Fp prefixes be dropped entirely now?

@tbu-
Copy link
Contributor Author

tbu- commented Dec 22, 2014

@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.
@tbu-
Copy link
Contributor Author

tbu- commented Dec 23, 2014

@alexcrichton Rebased after merge failure.

bors added a commit that referenced this pull request Dec 23, 2014
@bors bors merged commit 16f01cc into rust-lang:master Dec 24, 2014
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.

7 participants