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

ToStr should return the same as Show #12477

Closed
frgomes opened this issue Feb 22, 2014 · 1 comment · Fixed by #12412
Closed

ToStr should return the same as Show #12477

frgomes opened this issue Feb 22, 2014 · 1 comment · Fixed by #12412

Comments

@frgomes
Copy link

frgomes commented Feb 22, 2014

I found a floating point rounding error in ToStr.
Also, I would expect that ToStr should return exactly the same as Show returns, including all whitespaces.

#[deriving(Show, ToStr)]
struct S {
    f : f32,
    d : f64,
}

fn main() {
    let f : f32 = 1.8;
    println!("{}", f);          // prints '1.8'
    println!("{}", f.to_str()); // prints '1.79999995'

    let s = S { f: 1.8, d: 1.8 };
    println!("{}", s);          // prints 'S { f: 1.8, d: 1.8 }'
    println!("{}", s.to_str()); // prints 'S{f: 1.79999995, d: 1.8}'
}
@alexcrichton
Copy link
Member

This will be closed by #12412.

@bors bors closed this as completed in 6720977 Feb 24, 2014
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 25, 2022
Restart server automatically on settings changes

Closes rust-lang#12476

I think this works quite well, but if you think it would be better to put it behind a setting I can do that.
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this issue Mar 21, 2024
CI: replace `cancel-outdated-builds` with `concurrency` group

This is the last remaining [usage](https://github.com/search?q=org%3Arust-lang%20cancel-outdated-builds&type=code) of the [cancel-outdated-builds](https://github.com/rust-lang/simpleinfra/tree/master/github-actions/cancel-outdated-builds) CI action. Which means that if we remove its usage, we can remove the code of the action :)

This action was replaced in `rust-lang/rust` with the native Github Actions `concurrency` group [last year](rust-lang#112955).

Note that unlike `rust-lang/rust`, which explicitly allows parallel try builds, `clippy` did not allow them, as all steps of the `clippy_bors.yaml` workflow used the `cancel-outdated-builds` action, regardless of the branch. So the new `concurrency` group mirrors that, which makes it a bit simpler than on `rust-lang/rust`.

changelog: none

r? `@Mark-Simulacrum`
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 a pull request may close this issue.

2 participants