[INFO] cloning repository https://github.com/elBranchi/rust_concepts [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/elBranchi/rust_concepts" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FelBranchi%2Frust_concepts", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FelBranchi%2Frust_concepts'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c911464bb7539f611a08e25a92dcd86051998bcd [INFO] linting elBranchi/rust_concepts against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FelBranchi%2Frust_concepts" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/elBranchi/rust_concepts [INFO] finished tweaking git repo https://github.com/elBranchi/rust_concepts [INFO] tweaked toml for git repo https://github.com/elBranchi/rust_concepts written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/elBranchi/rust_concepts 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/elBranchi/rust_concepts 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] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded zerocopy-derive v0.8.21 [INFO] [stderr] Downloaded rand_core v0.9.2 [INFO] [stderr] Downloaded zerocopy v0.8.21 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 1f48a6e52f5210fa956b1874f9d183486b11182df57cbd8b24f6dce04975267b [INFO] running `Command { std: "docker" "start" "-a" "1f48a6e52f5210fa956b1874f9d183486b11182df57cbd8b24f6dce04975267b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1f48a6e52f5210fa956b1874f9d183486b11182df57cbd8b24f6dce04975267b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1f48a6e52f5210fa956b1874f9d183486b11182df57cbd8b24f6dce04975267b", kill_on_drop: false }` [INFO] [stdout] 1f48a6e52f5210fa956b1874f9d183486b11182df57cbd8b24f6dce04975267b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 5f40d4236608e61f8fc68d7a45e9c60ec43e6360baddc520fe5769a8c44a0738 [INFO] running `Command { std: "docker" "start" "-a" "5f40d4236608e61f8fc68d7a45e9c60ec43e6360baddc520fe5769a8c44a0738", kill_on_drop: false }` [INFO] [stderr] Compiling unicode-ident v1.0.17 [INFO] [stderr] Compiling libc v0.2.170 [INFO] [stderr] Compiling getrandom v0.3.1 [INFO] [stderr] Compiling zerocopy v0.8.21 [INFO] [stderr] Compiling proc-macro2 v1.0.93 [INFO] [stderr] Compiling quote v1.0.38 [INFO] [stderr] Compiling syn v2.0.98 [INFO] [stderr] Checking rand_core v0.9.2 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking ppv-lite86 v0.2.20 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.9.0 [INFO] [stderr] Checking rust_concepts v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/utils/interleave_iter.rs:31:46 [INFO] [stdout] | [INFO] [stdout] 31 | self.use_front = (!self.use_front && !self.front.is_none() && !self.back.is_none()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.front.is_some()` [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 boolean expression can be simplified [INFO] [stdout] --> src/utils/interleave_iter.rs:31:71 [INFO] [stdout] | [INFO] [stdout] 31 | self.use_front = (!self.use_front && !self.front.is_none() && !self.back.is_none()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.back.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/utils/weave_iter.rs:73:26 [INFO] [stdout] | [INFO] [stdout] 73 | next_found = !next.is_none() || self.next_from == start_on; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `next.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/utils/weave_iter.rs:102:5 [INFO] [stdout] | [INFO] [stdout] 83 | / let weave = (0..item_count).scan(iters, |iters, idx| { [INFO] [stdout] 84 | | let mut curr_idx = idx % iters.len(); [INFO] [stdout] 85 | | [INFO] [stdout] 86 | | let mut next_value = Option::<&T>::None; [INFO] [stdout] ... | [INFO] [stdout] 99 | | next_value [INFO] [stdout] 100 | | }); [INFO] [stdout] | |_______- unnecessary `let` binding [INFO] [stdout] 101 | [INFO] [stdout] 102 | weave [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 83 ~ [INFO] [stdout] 84 | [INFO] [stdout] 85 ~ (0..item_count).scan(iters, |iters, idx| { [INFO] [stdout] 86 + let mut curr_idx = idx % iters.len(); [INFO] [stdout] 87 + [INFO] [stdout] 88 + let mut next_value = Option::<&T>::None; [INFO] [stdout] 89 + while curr_idx < iters.len() { [INFO] [stdout] 90 + next_value = iters[curr_idx].next(); [INFO] [stdout] 91 + match next_value { [INFO] [stdout] 92 + None => { [INFO] [stdout] 93 + curr_idx = (curr_idx + 1) % iters.len(); [INFO] [stdout] 94 + } [INFO] [stdout] 95 + _ => { [INFO] [stdout] 96 + break; [INFO] [stdout] 97 + } [INFO] [stdout] 98 + } [INFO] [stdout] 99 + } [INFO] [stdout] 100 + [INFO] [stdout] 101 + next_value [INFO] [stdout] 102 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/utils/weave_iter.rs:134:5 [INFO] [stdout] | [INFO] [stdout] 113 | / let weave = (0..).scan(iters, |state, idx| { [INFO] [stdout] 114 | | let offset = idx % state.len(); [INFO] [stdout] 115 | | let mut next_value = Option::<&E>::None; [INFO] [stdout] ... | [INFO] [stdout] 131 | | next_value [INFO] [stdout] 132 | | }); [INFO] [stdout] | |_______- unnecessary `let` binding [INFO] [stdout] 133 | [INFO] [stdout] 134 | weave [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 113 ~ [INFO] [stdout] 114 | [INFO] [stdout] 115 ~ (0..).scan(iters, |state, idx| { [INFO] [stdout] 116 + let offset = idx % state.len(); [INFO] [stdout] 117 + let mut next_value = Option::<&E>::None; [INFO] [stdout] 118 + [INFO] [stdout] 119 + let mut idx = 0; [INFO] [stdout] 120 + while idx < state.len() { [INFO] [stdout] 121 + let curr_idx = (offset + idx) % state.len(); [INFO] [stdout] 122 + next_value = state[curr_idx].next(); [INFO] [stdout] 123 + [INFO] [stdout] 124 + match next_value { [INFO] [stdout] 125 + None => { [INFO] [stdout] 126 + idx += 1; [INFO] [stdout] 127 + } [INFO] [stdout] 128 + _ => { [INFO] [stdout] 129 + break; [INFO] [stdout] 130 + } [INFO] [stdout] 131 + } [INFO] [stdout] 132 + } [INFO] [stdout] 133 + next_value [INFO] [stdout] 134 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/utils/interleave_iter.rs:31:46 [INFO] [stdout] | [INFO] [stdout] 31 | self.use_front = (!self.use_front && !self.front.is_none() && !self.back.is_none()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `self.front.is_some()` [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 boolean expression can be simplified [INFO] [stdout] --> src/utils/interleave_iter.rs:31:71 [INFO] [stdout] | [INFO] [stdout] 31 | self.use_front = (!self.use_front && !self.front.is_none() && !self.back.is_none()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.back.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `th` [INFO] [stdout] --> src/bin/thread_time.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let th = thread::spawn(|| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_th` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `simple_sleep` is never used [INFO] [stdout] --> src/bin/thread_time.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | fn simple_sleep(){ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/utils/weave_iter.rs:73:26 [INFO] [stdout] | [INFO] [stdout] 73 | next_found = !next.is_none() || self.next_from == start_on; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `next.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/utils/weave_iter.rs:102:5 [INFO] [stdout] | [INFO] [stdout] 83 | / let weave = (0..item_count).scan(iters, |iters, idx| { [INFO] [stdout] 84 | | let mut curr_idx = idx % iters.len(); [INFO] [stdout] 85 | | [INFO] [stdout] 86 | | let mut next_value = Option::<&T>::None; [INFO] [stdout] ... | [INFO] [stdout] 99 | | next_value [INFO] [stdout] 100 | | }); [INFO] [stdout] | |_______- unnecessary `let` binding [INFO] [stdout] 101 | [INFO] [stdout] 102 | weave [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 83 ~ [INFO] [stdout] 84 | [INFO] [stdout] 85 ~ (0..item_count).scan(iters, |iters, idx| { [INFO] [stdout] 86 + let mut curr_idx = idx % iters.len(); [INFO] [stdout] 87 + [INFO] [stdout] 88 + let mut next_value = Option::<&T>::None; [INFO] [stdout] 89 + while curr_idx < iters.len() { [INFO] [stdout] 90 + next_value = iters[curr_idx].next(); [INFO] [stdout] 91 + match next_value { [INFO] [stdout] 92 + None => { [INFO] [stdout] 93 + curr_idx = (curr_idx + 1) % iters.len(); [INFO] [stdout] 94 + } [INFO] [stdout] 95 + _ => { [INFO] [stdout] 96 + break; [INFO] [stdout] 97 + } [INFO] [stdout] 98 + } [INFO] [stdout] 99 + } [INFO] [stdout] 100 + [INFO] [stdout] 101 + next_value [INFO] [stdout] 102 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/utils/weave_iter.rs:134:5 [INFO] [stdout] | [INFO] [stdout] 113 | / let weave = (0..).scan(iters, |state, idx| { [INFO] [stdout] 114 | | let offset = idx % state.len(); [INFO] [stdout] 115 | | let mut next_value = Option::<&E>::None; [INFO] [stdout] ... | [INFO] [stdout] 131 | | next_value [INFO] [stdout] 132 | | }); [INFO] [stdout] | |_______- unnecessary `let` binding [INFO] [stdout] 133 | [INFO] [stdout] 134 | weave [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 113 ~ [INFO] [stdout] 114 | [INFO] [stdout] 115 ~ (0..).scan(iters, |state, idx| { [INFO] [stdout] 116 + let offset = idx % state.len(); [INFO] [stdout] 117 + let mut next_value = Option::<&E>::None; [INFO] [stdout] 118 + [INFO] [stdout] 119 + let mut idx = 0; [INFO] [stdout] 120 + while idx < state.len() { [INFO] [stdout] 121 + let curr_idx = (offset + idx) % state.len(); [INFO] [stdout] 122 + next_value = state[curr_idx].next(); [INFO] [stdout] 123 + [INFO] [stdout] 124 + match next_value { [INFO] [stdout] 125 + None => { [INFO] [stdout] 126 + idx += 1; [INFO] [stdout] 127 + } [INFO] [stdout] 128 + _ => { [INFO] [stdout] 129 + break; [INFO] [stdout] 130 + } [INFO] [stdout] 131 + } [INFO] [stdout] 132 + } [INFO] [stdout] 133 + next_value [INFO] [stdout] 134 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/utils/weave_iter.rs:163:22 [INFO] [stdout] | [INFO] [stdout] 163 | let result = weave(¶m[..]).map(|r| *r).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `weave(¶m[..]).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> src/utils/weave_iter.rs:175:22 [INFO] [stdout] | [INFO] [stdout] 175 | let result = weave_iter(param.into_iter()) [INFO] [stdout] | ______________________^ [INFO] [stdout] 176 | | .map(|v| *v) [INFO] [stdout] | |________________________^ help: consider calling the dedicated `copied` method: `weave_iter(param.into_iter()).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/module_use.rs:10:14 [INFO] [stdout] | [INFO] [stdout] 10 | .map(|s| String::from(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/module_use.rs:14:14 [INFO] [stdout] | [INFO] [stdout] 14 | .map(|s| String::from(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/bin/module_use.rs:25:25 [INFO] [stdout] | [INFO] [stdout] 25 | fn to_str<'a,'b>(s: &'a String) -> &'b str [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] 25 ~ fn to_str<'a,'b>(s: &'a str) -> &'b str [INFO] [stdout] 26 | where 'a: 'b { [INFO] [stdout] 27 | [INFO] [stdout] 28 ~ s [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_restrictions` is never used [INFO] [stdout] --> src/bin/shared.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn check_restrictions(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/module_use.rs:10:14 [INFO] [stdout] | [INFO] [stdout] 10 | .map(|s| String::from(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `use_min` is never used [INFO] [stdout] --> src/bin/shared.rs:52:4 [INFO] [stdout] | [INFO] [stdout] 52 | fn use_min() { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `min` is never used [INFO] [stdout] --> src/bin/shared.rs:69:4 [INFO] [stdout] | [INFO] [stdout] 69 | fn min<'a, 'b, 'c, T: PartialOrd>(val1: &'a T, val2: &'b T) -> &'c T [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bin/module_use.rs:14:14 [INFO] [stdout] | [INFO] [stdout] 14 | .map(|s| String::from(s)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `String::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_restrictions` is never used [INFO] [stdout] --> src/bin/shared.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | fn check_restrictions(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `use_min` is never used [INFO] [stdout] --> src/bin/shared.rs:52:4 [INFO] [stdout] | [INFO] [stdout] 52 | fn use_min() { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `min` is never used [INFO] [stdout] --> src/bin/shared.rs:69:4 [INFO] [stdout] | [INFO] [stdout] 69 | fn min<'a, 'b, 'c, T: PartialOrd>(val1: &'a T, val2: &'b T) -> &'c T [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/bin/shared.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | s4.push_str("w"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `s4.push('w')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/bin/shared.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | s4.push_str("w"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `s4.push('w')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/bin/shared.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | elem.push_str("#"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `elem.push('#')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/bin/module_use.rs:25:25 [INFO] [stdout] | [INFO] [stdout] 25 | fn to_str<'a,'b>(s: &'a String) -> &'b str [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] 25 ~ fn to_str<'a,'b>(s: &'a str) -> &'b str [INFO] [stdout] 26 | where 'a: 'b { [INFO] [stdout] 27 | [INFO] [stdout] 28 ~ s [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/bin/shared.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | elem.push_str("#"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `elem.push('#')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `a16` [INFO] [stdout] --> src/bin/iterator_use.rs:15:14 [INFO] [stdout] | [INFO] [stdout] 15 | for i in 0..a16.len() { [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] 15 - for i in 0..a16.len() { [INFO] [stdout] 15 + for (i, ) in a16.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `th` [INFO] [stdout] --> src/bin/thread_time.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let th = thread::spawn(|| { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_th` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `simple_sleep` is never used [INFO] [stdout] --> src/bin/thread_time.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | fn simple_sleep(){ [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/wordgen.rs:32:45 [INFO] [stdout] | [INFO] [stdout] 32 | fn get_rand_part<'a, T: Rng>(parts: &'a Vec, rng: &mut T) -> &'a str { [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] 32 - fn get_rand_part<'a, T: Rng>(parts: &'a Vec, rng: &mut T) -> &'a str { [INFO] [stdout] 32 + fn get_rand_part<'a, T: Rng>(parts: &'a [String], rng: &mut T) -> &'a str { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/bin/iterator_use.rs:56:20 [INFO] [stdout] | [INFO] [stdout] 56 | for v in (&v8).into_iter() { [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: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/wordgen.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 34 | let part = &parts[idx]; [INFO] [stdout] | ----------------------- unnecessary `let` binding [INFO] [stdout] 35 | [INFO] [stdout] 36 | part [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 34 ~ [INFO] [stdout] 35 | [INFO] [stdout] 36 ~ (&parts[idx]) as _ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `d` [INFO] [stdout] --> src/bin/borrow_own.rs:179:9 [INFO] [stdout] | [INFO] [stdout] 179 | let d = Point::new(-6, 2); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_d` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mut_c` [INFO] [stdout] --> src/bin/borrow_own.rs:200:9 [INFO] [stdout] | [INFO] [stdout] 200 | let mut_c = &mut c; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_mut_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/bin/iterator_use.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `d` [INFO] [stdout] --> src/bin/borrow_own.rs:179:9 [INFO] [stdout] | [INFO] [stdout] 179 | let d = Point::new(-6, 2); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_d` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mut_c` [INFO] [stdout] --> src/bin/borrow_own.rs:200:9 [INFO] [stdout] | [INFO] [stdout] 200 | let mut_c = &mut c; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_mut_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/borrow_own.rs:212:9 [INFO] [stdout] | [INFO] [stdout] 212 | let mut p2 = PointNoCopy::default(); [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/borrow_own.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | let mut p3 = PointNoCopy::new(9, 99); [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p2` [INFO] [stdout] --> src/bin/borrow_own.rs:208:9 [INFO] [stdout] | [INFO] [stdout] 208 | let p2 = PointNoCopy::new(10, 14); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_p2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p2` [INFO] [stdout] --> src/bin/borrow_own.rs:212:9 [INFO] [stdout] | [INFO] [stdout] 212 | let mut p2 = PointNoCopy::default(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_p2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p3` [INFO] [stdout] --> src/bin/borrow_own.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | let mut p3 = PointNoCopy::new(9, 99); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_p3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/borrow_own.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | mut a: &PointNoCopy, [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/borrow_own.rs:235:9 [INFO] [stdout] | [INFO] [stdout] 235 | mut c: &mut PointNoCopy, [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/bin/borrow_own.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | mut a: &PointNoCopy, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `d` [INFO] [stdout] --> src/bin/borrow_own.rs:236:9 [INFO] [stdout] | [INFO] [stdout] 236 | d: &PointNoCopy, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_d` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/iterator_use.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 101 | / let next = if idx % 2 == 0 { [INFO] [stdout] 102 | | state.0.next().or_else(|| state.1.next()) [INFO] [stdout] 103 | | } else { [INFO] [stdout] 104 | | state.1.next().or_else(|| state.0.next()) [INFO] [stdout] 105 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 106 | next [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 101 ~ [INFO] [stdout] 102 ~ if idx % 2 == 0 { [INFO] [stdout] 103 + state.0.next().or_else(|| state.1.next()) [INFO] [stdout] 104 + } else { [INFO] [stdout] 105 + state.1.next().or_else(|| state.0.next()) [INFO] [stdout] 106 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/borrow_own.rs:212:9 [INFO] [stdout] | [INFO] [stdout] 212 | let mut p2 = PointNoCopy::default(); [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/borrow_own.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | let mut p3 = PointNoCopy::new(9, 99); [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p2` [INFO] [stdout] --> src/bin/borrow_own.rs:208:9 [INFO] [stdout] | [INFO] [stdout] 208 | let p2 = PointNoCopy::new(10, 14); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_p2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p2` [INFO] [stdout] --> src/bin/borrow_own.rs:212:9 [INFO] [stdout] | [INFO] [stdout] 212 | let mut p2 = PointNoCopy::default(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_p2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p3` [INFO] [stdout] --> src/bin/borrow_own.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | let mut p3 = PointNoCopy::new(9, 99); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_p3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/borrow_own.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | mut a: &PointNoCopy, [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/borrow_own.rs:235:9 [INFO] [stdout] | [INFO] [stdout] 235 | mut c: &mut PointNoCopy, [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/bin/borrow_own.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | mut a: &PointNoCopy, [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `d` [INFO] [stdout] --> src/bin/borrow_own.rs:236:9 [INFO] [stdout] | [INFO] [stdout] 236 | d: &PointNoCopy, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_d` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/borrow_own.rs:148:5 [INFO] [stdout] | [INFO] [stdout] 148 | print!("{mut_c:?}\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 148 - print!("{mut_c:?}\n"); [INFO] [stdout] 148 + println!("{mut_c:?}"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/borrow_own.rs:172:5 [INFO] [stdout] | [INFO] [stdout] 172 | print!("{c:?} {d:?}\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 172 - print!("{c:?} {d:?}\n"); [INFO] [stdout] 172 + println!("{c:?} {d:?}"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/borrow_own.rs:148:5 [INFO] [stdout] | [INFO] [stdout] 148 | print!("{mut_c:?}\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] = note: `#[warn(clippy::print_with_newline)]` on by default [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 148 - print!("{mut_c:?}\n"); [INFO] [stdout] 148 + println!("{mut_c:?}"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `print!()` with a format string that ends in a single newline [INFO] [stdout] --> src/bin/borrow_own.rs:172:5 [INFO] [stdout] | [INFO] [stdout] 172 | print!("{c:?} {d:?}\n"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stdout] help: use `println!` instead [INFO] [stdout] | [INFO] [stdout] 172 - print!("{c:?} {d:?}\n"); [INFO] [stdout] 172 + println!("{c:?} {d:?}"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/basic_traits.rs:107:12 [INFO] [stdout] | [INFO] [stdout] 107 | if self.next != Option::None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `self.next.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/basic_traits.rs:151:9 [INFO] [stdout] | [INFO] [stdout] 137 | / let iter = match self { [INFO] [stdout] 138 | | Line2D::FromOrigin(direction) => { [INFO] [stdout] 139 | | let origin = Point2D::default(); [INFO] [stdout] 140 | | Line2DIterator::new(direction.x, direction.y, origin, origin + *direction) [INFO] [stdout] ... | [INFO] [stdout] 150 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 151 | iter [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 137 ~ [INFO] [stdout] 138 ~ match self { [INFO] [stdout] 139 + Line2D::FromOrigin(direction) => { [INFO] [stdout] 140 + let origin = Point2D::default(); [INFO] [stdout] 141 + Line2DIterator::new(direction.x, direction.y, origin, origin + *direction) [INFO] [stdout] 142 + } [INFO] [stdout] 143 + Line2D::WithEndPoint(origin, end) => { [INFO] [stdout] 144 + let direction = *end - *origin; [INFO] [stdout] 145 + Line2DIterator::new(direction.x, direction.y, *origin, *end) [INFO] [stdout] 146 + } [INFO] [stdout] 147 + Line2D::WithDirection(origin, direction) => { [INFO] [stdout] 148 + let end = *origin + *direction; [INFO] [stdout] 149 + Line2DIterator::new(direction.x, direction.y, *origin, end) [INFO] [stdout] 150 + } [INFO] [stdout] 151 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/bin/basic_traits.rs:155:1 [INFO] [stdout] | [INFO] [stdout] 155 | / impl Default for Point2D { [INFO] [stdout] 156 | | fn default() -> Self { [INFO] [stdout] 157 | | Self { [INFO] [stdout] 158 | | x: Default::default(), [INFO] [stdout] ... | [INFO] [stdout] 162 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 42 + #[derive(Default)] [INFO] [stdout] 43 | struct Point2D { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/bin/wordgen.rs:32:45 [INFO] [stdout] | [INFO] [stdout] 32 | fn get_rand_part<'a, T: Rng>(parts: &'a Vec, rng: &mut T) -> &'a str { [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] 32 - fn get_rand_part<'a, T: Rng>(parts: &'a Vec, rng: &mut T) -> &'a str { [INFO] [stdout] 32 + fn get_rand_part<'a, T: Rng>(parts: &'a [String], rng: &mut T) -> &'a str { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/wordgen.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 34 | let part = &parts[idx]; [INFO] [stdout] | ----------------------- unnecessary `let` binding [INFO] [stdout] 35 | [INFO] [stdout] 36 | part [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 34 ~ [INFO] [stdout] 35 | [INFO] [stdout] 36 ~ (&parts[idx]) as _ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `a16` [INFO] [stdout] --> src/bin/iterator_use.rs:15:14 [INFO] [stdout] | [INFO] [stdout] 15 | for i in 0..a16.len() { [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] 15 - for i in 0..a16.len() { [INFO] [stdout] 15 + for (i, ) in a16.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/bin/iterator_use.rs:56:20 [INFO] [stdout] | [INFO] [stdout] 56 | for v in (&v8).into_iter() { [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: empty string literal in `println!` [INFO] [stdout] --> src/bin/iterator_use.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 81 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/iterator_use.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 101 | / let next = if idx % 2 == 0 { [INFO] [stdout] 102 | | state.0.next().or_else(|| state.1.next()) [INFO] [stdout] 103 | | } else { [INFO] [stdout] 104 | | state.1.next().or_else(|| state.0.next()) [INFO] [stdout] 105 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 106 | next [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 101 ~ [INFO] [stdout] 102 ~ if idx % 2 == 0 { [INFO] [stdout] 103 + state.0.next().or_else(|| state.1.next()) [INFO] [stdout] 104 + } else { [INFO] [stdout] 105 + state.1.next().or_else(|| state.0.next()) [INFO] [stdout] 106 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/basic_traits.rs:107:12 [INFO] [stdout] | [INFO] [stdout] 107 | if self.next != Option::None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `self.next.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bin/basic_traits.rs:151:9 [INFO] [stdout] | [INFO] [stdout] 137 | / let iter = match self { [INFO] [stdout] 138 | | Line2D::FromOrigin(direction) => { [INFO] [stdout] 139 | | let origin = Point2D::default(); [INFO] [stdout] 140 | | Line2DIterator::new(direction.x, direction.y, origin, origin + *direction) [INFO] [stdout] ... | [INFO] [stdout] 150 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 151 | iter [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 137 ~ [INFO] [stdout] 138 ~ match self { [INFO] [stdout] 139 + Line2D::FromOrigin(direction) => { [INFO] [stdout] 140 + let origin = Point2D::default(); [INFO] [stdout] 141 + Line2DIterator::new(direction.x, direction.y, origin, origin + *direction) [INFO] [stdout] 142 + } [INFO] [stdout] 143 + Line2D::WithEndPoint(origin, end) => { [INFO] [stdout] 144 + let direction = *end - *origin; [INFO] [stdout] 145 + Line2DIterator::new(direction.x, direction.y, *origin, *end) [INFO] [stdout] 146 + } [INFO] [stdout] 147 + Line2D::WithDirection(origin, direction) => { [INFO] [stdout] 148 + let end = *origin + *direction; [INFO] [stdout] 149 + Line2DIterator::new(direction.x, direction.y, *origin, end) [INFO] [stdout] 150 + } [INFO] [stdout] 151 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/bin/basic_traits.rs:155:1 [INFO] [stdout] | [INFO] [stdout] 155 | / impl Default for Point2D { [INFO] [stdout] 156 | | fn default() -> Self { [INFO] [stdout] 157 | | Self { [INFO] [stdout] 158 | | x: Default::default(), [INFO] [stdout] ... | [INFO] [stdout] 162 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 42 + #[derive(Default)] [INFO] [stdout] 43 | struct Point2D { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 8.69s [INFO] running `Command { std: "docker" "inspect" "5f40d4236608e61f8fc68d7a45e9c60ec43e6360baddc520fe5769a8c44a0738", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5f40d4236608e61f8fc68d7a45e9c60ec43e6360baddc520fe5769a8c44a0738", kill_on_drop: false }` [INFO] [stdout] 5f40d4236608e61f8fc68d7a45e9c60ec43e6360baddc520fe5769a8c44a0738