Skip to content

Avoid change in float rounding behaviour in tests#28

Closed
Nemo157 wants to merge 1 commit intoNullus157:prīmumfrom
Nemo157:nightly-floats
Closed

Avoid change in float rounding behaviour in tests#28
Nemo157 wants to merge 1 commit intoNullus157:prīmumfrom
Nemo157:nightly-floats

Conversation

@Nemo157
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

1 participant