Skip to content

Add IterBytes impls for float/f32/f64. This allows creating HashMaps with floats as keys. #7156

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

Closed
wants to merge 1 commit into from

Conversation

Dretch
Copy link
Contributor

@Dretch Dretch commented Jun 15, 2013

It can sometimes be useful to have maps/sets of floating point values.

Doing arithmetic with floats and then using them as keys is, of course, not a good idea.

@thestinger
Copy link
Contributor

HashMap is going to move to using TotalEq soon, so floats aren't going to be usable as keys until someone implements the IEEE754 total ordering.

@graydon
Copy link
Contributor

graydon commented Jun 15, 2013

Oops! Sorry

bors added a commit that referenced this pull request Jun 16, 2013
It can sometimes be useful to have maps/sets of floating point values.

Doing arithmetic with floats and then using them as keys is, of course, not a good idea.
@bors bors closed this Jun 16, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request May 6, 2021
[single_char_pattern] add strip_prefix and strip_suffix

Title says it all. Adjusted ui tests.

I added the second commit in case you don't like that I moved that table into `single_char_pattern.rs` directly. I don't see any reason why it shouldn't be in that file. It isn't used anywhere else.

*Please write a short comment explaining your change (or "none" for internal only changes)*

changelog: add strip_prefix and strip_suffix to single_char_pattern lint
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.

4 participants