Skip to content

resurect shootout-mandelbrot.rs #10531

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

Merged
merged 3 commits into from
Nov 17, 2013
Merged

Conversation

TeXitoi
Copy link
Contributor

@TeXitoi TeXitoi commented Nov 17, 2013

Changes:

  • add licence;
  • remove usage of libc and unsafe;
  • use BufferedWriter to improve performance;
  • use a DummyWriter to cancel binary output in test.

Changes:
* add licence;
* remove usage of libc and unsafe;
* use BufferedWriter to improve performance;
* use a DummyWriter to cancel binary output in test.
println!("P4\n{} {}", w, h);
let args = std::os::args();
let (w, mut out) = if args.len() < 2 {
println("Test mode: do not dump the image.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not dump the image because it's not utf8, which interferes with the test runner, maybe?

let args = std::os::args();
let (w, mut out) = if args.len() < 2 {
println("Test mode: do not dump the image because it's not utf8,"
+ " which interferes with the test runner.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can break strings over multiple lines, and escape whitespace (i.e. the \n and the leading spaces of the next line) with \, i.e.

        println("Test mode: do not dump the image because it's not utf8, \
                 which interferes with the test runner.");

bors added a commit that referenced this pull request Nov 17, 2013
Changes:
* add licence;
* remove usage of libc and unsafe;
* use BufferedWriter to improve performance;
* use a DummyWriter to cancel binary output in test.
@bors bors closed this Nov 17, 2013
@bors bors merged commit 93bb99e into rust-lang:master Nov 17, 2013
@TeXitoi TeXitoi deleted the mandelbrot-resurected branch December 1, 2013 18:15
flip1995 pushed a commit to flip1995/rust that referenced this pull request Apr 6, 2023
Add explanation on how to run `cargo-clippy` and `clippy-driver`

I don't know how this would be done on Windows or MacOS, feedback appreciated.

I did find this snippet for MacOS but it seems a little sketchy.

https://github.com./rust-lang/rust-clippy/blob/1d1e72308e5bcdf5abe95c1d29dfe82524940061/.github/workflows/clippy_bors.yml#L98-L102

changelog: none
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