-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Conversation
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."); |
There was a problem hiding this comment.
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."); |
There was a problem hiding this comment.
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.");
Changes: * add licence; * remove usage of libc and unsafe; * use BufferedWriter to improve performance; * use a DummyWriter to cancel binary output in test.
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
Changes: