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

Avoid change in float rounding behaviour in tests #28

Closed
wants to merge 1 commit into from

Conversation

Nemo157
Copy link
Member

@Nemo157 Nemo157 commented Nov 17, 2022

rust-lang/rust#102935 changed the behaviour of format!("{:.0}", 0.5) to round to 0 instead of 1 for consistency. The test case I copied from std was using this, so change to using 1.5 which has the same behaviour on stable and nightly.

@Nemo157
Copy link
Member Author

Nemo157 commented Nov 17, 2022

bors r+

bors bot added a commit that referenced this pull request Nov 17, 2022
28: Avoid change in float rounding behaviour in tests r=Nemo157 a=Nemo157

rust-lang/rust#102935 changed the behaviour of `format!("{:.0}", 0.5)` to round to 0 instead of 1 for consistency. The test case I copied from `std` was using this, so change to using 1.5 which has the same behaviour on stable and nightly.

Co-authored-by: Wim Looman <git@nemo157.com>
@bors
Copy link
Contributor

bors bot commented Nov 17, 2022

Build succeeded:

@bors bors bot closed this Nov 17, 2022
@Nemo157 Nemo157 deleted the nightly-floats branch November 17, 2022 08:46
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.

None yet

1 participant