[INFO] cloning repository https://github.com/AsyncEgg/primorial_of_a_number [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/AsyncEgg/primorial_of_a_number" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAsyncEgg%2Fprimorial_of_a_number", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAsyncEgg%2Fprimorial_of_a_number'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] fb9ffb7233d985921947eb3aa74b01e3d5ef94f5 [INFO] linting AsyncEgg/primorial_of_a_number against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAsyncEgg%2Fprimorial_of_a_number" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/AsyncEgg/primorial_of_a_number [INFO] finished tweaking git repo https://github.com/AsyncEgg/primorial_of_a_number [INFO] tweaked toml for git repo https://github.com/AsyncEgg/primorial_of_a_number written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/AsyncEgg/primorial_of_a_number on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/AsyncEgg/primorial_of_a_number already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded tui v0.19.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 9b8550428796627ab045472f318c4f5888b050dcf90653facec5d791c37669b4 [INFO] running `Command { std: "docker" "start" "-a" "9b8550428796627ab045472f318c4f5888b050dcf90653facec5d791c37669b4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9b8550428796627ab045472f318c4f5888b050dcf90653facec5d791c37669b4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9b8550428796627ab045472f318c4f5888b050dcf90653facec5d791c37669b4", kill_on_drop: false }` [INFO] [stdout] 9b8550428796627ab045472f318c4f5888b050dcf90653facec5d791c37669b4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 4f4b06236ff8e6b3477b66ba662a3b952b4c306de17193ff77b04d75cfb87c2d [INFO] running `Command { std: "docker" "start" "-a" "4f4b06236ff8e6b3477b66ba662a3b952b4c306de17193ff77b04d75cfb87c2d", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.142 [INFO] [stderr] Compiling signal-hook v0.3.15 [INFO] [stderr] Compiling num-traits v0.2.15 [INFO] [stderr] Compiling num-integer v0.1.45 [INFO] [stderr] Compiling num-bigint v0.4.3 [INFO] [stderr] Checking unicode-segmentation v1.10.1 [INFO] [stderr] Checking signal-hook-registry v1.4.1 [INFO] [stderr] Checking parking_lot_core v0.9.7 [INFO] [stderr] Checking mio v0.8.6 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Checking signal-hook-mio v0.2.3 [INFO] [stderr] Checking crossterm v0.25.0 [INFO] [stderr] Checking crossterm v0.26.1 [INFO] [stderr] Checking tui v0.19.0 [INFO] [stderr] Checking primorial_of_a_number v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: the loop variable `i` is used to index `sieve` [INFO] [stdout] --> src/lib.rs:105:14 [INFO] [stdout] | [INFO] [stdout] 105 | for i in 1..=sieve_limit { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 105 - for i in 1..=sieve_limit { [INFO] [stdout] 105 + for (i, ) in sieve.iter().enumerate().take(sieve_limit + 1).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/lib.rs:169:5 [INFO] [stdout] | [INFO] [stdout] 169 | / match read_mode { [INFO] [stdout] 170 | | &ReadMode::Bin => { [INFO] [stdout] 171 | | let start = std::time::Instant::now();//Timer started [INFO] [stdout] ... | [INFO] [stdout] 196 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 169 ~ match *read_mode { [INFO] [stdout] 170 ~ ReadMode::Bin => { [INFO] [stdout] 171 | let start = std::time::Instant::now();//Timer started [INFO] [stdout] ... [INFO] [stdout] 181 | } [INFO] [stdout] 182 ~ ReadMode::Txt => { [INFO] [stdout] 183 | let start = std::time::Instant::now();//Timer started [INFO] [stdout] ... [INFO] [stdout] 192 | } [INFO] [stdout] 193 ~ ReadMode::None => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `sieve` [INFO] [stdout] --> src/lib.rs:105:14 [INFO] [stdout] | [INFO] [stdout] 105 | for i in 1..=sieve_limit { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 105 - for i in 1..=sieve_limit { [INFO] [stdout] 105 + for (i, ) in sieve.iter().enumerate().take(sieve_limit + 1).skip(1) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you don't need to add `&` to all patterns [INFO] [stdout] --> src/lib.rs:169:5 [INFO] [stdout] | [INFO] [stdout] 169 | / match read_mode { [INFO] [stdout] 170 | | &ReadMode::Bin => { [INFO] [stdout] 171 | | let start = std::time::Instant::now();//Timer started [INFO] [stdout] ... | [INFO] [stdout] 196 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stdout] = note: `#[warn(clippy::match_ref_pats)]` on by default [INFO] [stdout] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stdout] | [INFO] [stdout] 169 ~ match *read_mode { [INFO] [stdout] 170 ~ ReadMode::Bin => { [INFO] [stdout] 171 | let start = std::time::Instant::now();//Timer started [INFO] [stdout] ... [INFO] [stdout] 181 | } [INFO] [stdout] 182 ~ ReadMode::Txt => { [INFO] [stdout] 183 | let start = std::time::Instant::now();//Timer started [INFO] [stdout] ... [INFO] [stdout] 192 | } [INFO] [stdout] 193 ~ ReadMode::None => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:111:56 [INFO] [stdout] | [INFO] [stdout] 111 | if app.scroll_position != 0 && !((app.scroll_position as i32 - 9) <= 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((app.scroll_position as i32 - 9) > 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:102:25 [INFO] [stdout] | [INFO] [stdout] 102 | / if app.scroll_position != 0 { [INFO] [stdout] 103 | | app.scroll_position -= 1 [INFO] [stdout] 104 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 101 ~ KeyCode::Up [INFO] [stdout] 102 ~ if app.scroll_position != 0 => { [INFO] [stdout] 103 | app.scroll_position -= 1 [INFO] [stdout] 104 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:111:25 [INFO] [stdout] | [INFO] [stdout] 111 | / if app.scroll_position != 0 && !((app.scroll_position as i32 - 9) <= 0) { [INFO] [stdout] 112 | | app.scroll_position -= 10 [INFO] [stdout] 113 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 110 ~ KeyCode::Left [INFO] [stdout] 111 ~ if app.scroll_position != 0 && !((app.scroll_position as i32 - 9) <= 0) => { [INFO] [stdout] 112 | app.scroll_position -= 10 [INFO] [stdout] 113 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:122:37 [INFO] [stdout] | [INFO] [stdout] 122 | if drain == String::from("quit") || drain == String::from("q") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"quit"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:122:70 [INFO] [stdout] | [INFO] [stdout] 122 | if drain == String::from("quit") || drain == String::from("q") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"q"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/main.rs:126:52 [INFO] [stdout] | [INFO] [stdout] 126 | if !drain.chars().all(|ch| ch.is_digit(10)) || drain == String::new() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `ch.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:145:33 [INFO] [stdout] | [INFO] [stdout] 145 | ... return write_biguint_to_file(output, &app.write_mode) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 145 - return write_biguint_to_file(output, &app.write_mode) [INFO] [stdout] 145 + write_biguint_to_file(output, &app.write_mode) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:292:33 [INFO] [stdout] | [INFO] [stdout] 292 | let status = Paragraph::new(format!("{}",app.primes_status)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `app.primes_status.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:298:33 [INFO] [stdout] | [INFO] [stdout] 298 | let status = Paragraph::new(format!("{}",app.primorial_status)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `app.primorial_status.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:320:41 [INFO] [stdout] | [INFO] [stdout] 320 | let status = Paragraph::new(format!("{}",app.file_status)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `app.file_status.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:330:5 [INFO] [stdout] | [INFO] [stdout] 330 | let output; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `output` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 330 ~ [INFO] [stdout] 331 | [INFO] [stdout] 332 ~ let output = match app.output_switch { [INFO] [stdout] 333 | OutputSwitch::Enabled => { [INFO] [stdout] 334 ~ string_wrap(&app.output, chunk_width, &app.output_mode) [INFO] [stdout] 335 | } [INFO] [stdout] 336 | OutputSwitch::Disabled => { [INFO] [stdout] 337 ~ "Output disabled; Type output enable to enable output".to_string() [INFO] [stdout] 338 | } [INFO] [stdout] 339 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:360:24 [INFO] [stdout] | [INFO] [stdout] 360 | fn string_wrap(string: &String, chunk_width: u16, output_mode: &OutputMode) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 360 - fn string_wrap(string: &String, chunk_width: u16, output_mode: &OutputMode) -> String { [INFO] [stdout] 360 + fn string_wrap(string: &str, chunk_width: u16, output_mode: &OutputMode) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:111:56 [INFO] [stdout] | [INFO] [stdout] 111 | if app.scroll_position != 0 && !((app.scroll_position as i32 - 9) <= 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((app.scroll_position as i32 - 9) > 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:102:25 [INFO] [stdout] | [INFO] [stdout] 102 | / if app.scroll_position != 0 { [INFO] [stdout] 103 | | app.scroll_position -= 1 [INFO] [stdout] 104 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 101 ~ KeyCode::Up [INFO] [stdout] 102 ~ if app.scroll_position != 0 => { [INFO] [stdout] 103 | app.scroll_position -= 1 [INFO] [stdout] 104 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:111:25 [INFO] [stdout] | [INFO] [stdout] 111 | / if app.scroll_position != 0 && !((app.scroll_position as i32 - 9) <= 0) { [INFO] [stdout] 112 | | app.scroll_position -= 10 [INFO] [stdout] 113 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 110 ~ KeyCode::Left [INFO] [stdout] 111 ~ if app.scroll_position != 0 && !((app.scroll_position as i32 - 9) <= 0) => { [INFO] [stdout] 112 | app.scroll_position -= 10 [INFO] [stdout] 113 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:122:37 [INFO] [stdout] | [INFO] [stdout] 122 | if drain == String::from("quit") || drain == String::from("q") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"quit"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:122:70 [INFO] [stdout] | [INFO] [stdout] 122 | if drain == String::from("quit") || drain == String::from("q") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"q"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/main.rs:126:52 [INFO] [stdout] | [INFO] [stdout] 126 | if !drain.chars().all(|ch| ch.is_digit(10)) || drain == String::new() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `ch.is_ascii_digit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::slice::Chunks<'_, char>` [INFO] [stdout] --> src/main.rs:361:5 [INFO] [stdout] | [INFO] [stdout] 361 | / string [INFO] [stdout] 362 | | .chars() [INFO] [stdout] 363 | | .collect::>() [INFO] [stdout] 364 | | .chunks(chunk_width.into()) [INFO] [stdout] 365 | | .into_iter() [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 361 ~ string [INFO] [stdout] 362 + .chars() [INFO] [stdout] 363 + .collect::>() [INFO] [stdout] 364 + .chunks(chunk_width.into()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/main.rs:366:24 [INFO] [stdout] | [INFO] [stdout] 366 | .map(|chunk| chunk.into_iter().collect::()) [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:369:9 [INFO] [stdout] | [INFO] [stdout] 369 | / return match output_mode { [INFO] [stdout] 370 | | OutputMode::Number => format!("{}~ {}",i+1,s ).to_string(), [INFO] [stdout] 371 | | OutputMode::Message => s [INFO] [stdout] 372 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 369 ~ match output_mode { [INFO] [stdout] 370 + OutputMode::Number => format!("{}~ {}",i+1,s ).to_string(), [INFO] [stdout] 371 + OutputMode::Message => s [INFO] [stdout] 372 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:145:33 [INFO] [stdout] | [INFO] [stdout] 145 | ... return write_biguint_to_file(output, &app.write_mode) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 145 - return write_biguint_to_file(output, &app.write_mode) [INFO] [stdout] 145 + write_biguint_to_file(output, &app.write_mode) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:292:33 [INFO] [stdout] | [INFO] [stdout] 292 | let status = Paragraph::new(format!("{}",app.primes_status)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `app.primes_status.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:298:33 [INFO] [stdout] | [INFO] [stdout] 298 | let status = Paragraph::new(format!("{}",app.primorial_status)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `app.primorial_status.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:320:41 [INFO] [stdout] | [INFO] [stdout] 320 | let status = Paragraph::new(format!("{}",app.file_status)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `app.file_status.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:330:5 [INFO] [stdout] | [INFO] [stdout] 330 | let output; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `output` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 330 ~ [INFO] [stdout] 331 | [INFO] [stdout] 332 ~ let output = match app.output_switch { [INFO] [stdout] 333 | OutputSwitch::Enabled => { [INFO] [stdout] 334 ~ string_wrap(&app.output, chunk_width, &app.output_mode) [INFO] [stdout] 335 | } [INFO] [stdout] 336 | OutputSwitch::Disabled => { [INFO] [stdout] 337 ~ "Output disabled; Type output enable to enable output".to_string() [INFO] [stdout] 338 | } [INFO] [stdout] 339 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:360:24 [INFO] [stdout] | [INFO] [stdout] 360 | fn string_wrap(string: &String, chunk_width: u16, output_mode: &OutputMode) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 360 - fn string_wrap(string: &String, chunk_width: u16, output_mode: &OutputMode) -> String { [INFO] [stdout] 360 + fn string_wrap(string: &str, chunk_width: u16, output_mode: &OutputMode) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::slice::Chunks<'_, char>` [INFO] [stdout] --> src/main.rs:361:5 [INFO] [stdout] | [INFO] [stdout] 361 | / string [INFO] [stdout] 362 | | .chars() [INFO] [stdout] 363 | | .collect::>() [INFO] [stdout] 364 | | .chunks(chunk_width.into()) [INFO] [stdout] 365 | | .into_iter() [INFO] [stdout] | |________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 361 ~ string [INFO] [stdout] 362 + .chars() [INFO] [stdout] 363 + .collect::>() [INFO] [stdout] 364 + .chunks(chunk_width.into()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/main.rs:366:24 [INFO] [stdout] | [INFO] [stdout] 366 | .map(|chunk| chunk.into_iter().collect::()) [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:369:9 [INFO] [stdout] | [INFO] [stdout] 369 | / return match output_mode { [INFO] [stdout] 370 | | OutputMode::Number => format!("{}~ {}",i+1,s ).to_string(), [INFO] [stdout] 371 | | OutputMode::Message => s [INFO] [stdout] 372 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 369 ~ match output_mode { [INFO] [stdout] 370 + OutputMode::Number => format!("{}~ {}",i+1,s ).to_string(), [INFO] [stdout] 371 + OutputMode::Message => s [INFO] [stdout] 372 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.96s [INFO] running `Command { std: "docker" "inspect" "4f4b06236ff8e6b3477b66ba662a3b952b4c306de17193ff77b04d75cfb87c2d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4f4b06236ff8e6b3477b66ba662a3b952b4c306de17193ff77b04d75cfb87c2d", kill_on_drop: false }` [INFO] [stdout] 4f4b06236ff8e6b3477b66ba662a3b952b4c306de17193ff77b04d75cfb87c2d