[INFO] cloning repository https://github.com/chidam333/aoc-2023 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/chidam333/aoc-2023" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchidam333%2Faoc-2023", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchidam333%2Faoc-2023'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] fdcf0670e3bd4bf0ceb262a61c3da35cef213390 [INFO] linting chidam333/aoc-2023 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchidam333%2Faoc-2023" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/chidam333/aoc-2023 [INFO] finished tweaking git repo https://github.com/chidam333/aoc-2023 [INFO] tweaked toml for git repo https://github.com/chidam333/aoc-2023 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/chidam333/aoc-2023 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/chidam333/aoc-2023 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] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded anstyle-wincon v3.0.1 [INFO] [stderr] Downloaded clap v4.4.10 [INFO] [stderr] Downloaded anstyle-parse v0.2.2 [INFO] [stderr] Downloaded anstream v0.6.4 [INFO] [stderr] Downloaded clap_builder v4.4.9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 01187e730ac150df12733134632da7339fdf9e9fd4ff8c9872aabb22df934762 [INFO] running `Command { std: "docker" "start" "-a" "01187e730ac150df12733134632da7339fdf9e9fd4ff8c9872aabb22df934762", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "01187e730ac150df12733134632da7339fdf9e9fd4ff8c9872aabb22df934762", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "01187e730ac150df12733134632da7339fdf9e9fd4ff8c9872aabb22df934762", kill_on_drop: false }` [INFO] [stdout] 01187e730ac150df12733134632da7339fdf9e9fd4ff8c9872aabb22df934762 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 62936390beb84e512f87a2b6958fe456046613702917ffc1e01150c1ae0689a9 [INFO] running `Command { std: "docker" "start" "-a" "62936390beb84e512f87a2b6958fe456046613702917ffc1e01150c1ae0689a9", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.70 [INFO] [stderr] Checking anstyle v1.0.4 [INFO] [stderr] Checking anstyle-query v1.0.0 [INFO] [stderr] Checking anstyle-parse v0.2.2 [INFO] [stderr] Checking anstream v0.6.4 [INFO] [stderr] Checking clap_builder v4.4.9 [INFO] [stderr] Compiling quote v1.0.33 [INFO] [stderr] Compiling syn v2.0.39 [INFO] [stderr] Compiling clap_derive v4.4.7 [INFO] [stderr] Checking clap v4.4.10 [INFO] [stderr] Checking advent_of_code_2023 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `VecDeque` [INFO] [stdout] --> src/bin/day18.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{VecDeque, HashSet, HashMap}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: denote infinite loops with `loop { ... }` [INFO] [stdout] --> src/bin/day8.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | while true{ [INFO] [stdout] | ^^^^^^^^^^ help: use `loop` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(while_true)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/bin/day6.rs:13:75 [INFO] [stdout] | [INFO] [stdout] 13 | let time = lines.next().unwrap().split(":").collect::>()[1].trim().split_whitespace().collect::>().join("").... [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/bin/day6.rs:14:79 [INFO] [stdout] | [INFO] [stdout] 14 | let distance = lines.next().unwrap().split(":").collect::>()[1].trim().split_whitespace().collect::>().join(... [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/day6.rs:24:31 [INFO] [stdout] | [INFO] [stdout] 24 | let ans = ans_ways.iter().fold(1,|acc,val| acc*val); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Chars<'_>` [INFO] [stdout] --> src/bin/day8.rs:12:19 [INFO] [stdout] | [INFO] [stdout] 12 | let pattern = line_it.next().unwrap().chars().into_iter().collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `line_it.next().unwrap().chars()` [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] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day8.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | index = index+1; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `index += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/day18.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | let mut depth = col.join(""); [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: unused variable: `r` [INFO] [stdout] --> src/bin/day18.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | for r in 0..maxr+1{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/bin/day18.rs:90:13 [INFO] [stdout] | [INFO] [stdout] 90 | for c in 0..maxc+1{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `first_main` is never used [INFO] [stdout] --> src/bin/day2.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn first_main(){ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `colref` [INFO] [stdout] --> src/bin/day18.rs:27:18 [INFO] [stdout] | [INFO] [stdout] 27 | for i in 3..colref.len()-2{ [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 [INFO] [stdout] | [INFO] [stdout] 27 - for i in 3..colref.len()-2{ [INFO] [stdout] 27 + for in colref.iter().take(colref.len()-2).skip(3){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day18.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | return dug_clone; [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] 80 - return dug_clone; [INFO] [stdout] 80 + dug_clone [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day18.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 75 | cord[0] = cord[0] - minrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cord[0] -= minrow` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day18.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | cord[1] = cord[1] - mincol; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cord[1] -= mincol` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/day18.rs:114:11 [INFO] [stdout] | [INFO] [stdout] 114 | while stack.len()>0{ [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!stack.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/day18.rs:125:17 [INFO] [stdout] | [INFO] [stdout] 125 | / if nr>-1 && nr<=maxr as i32 && nc>-1 && nc<=maxc as i32 && arr[nr as usize][nc as usize] == '.'{ [INFO] [stdout] 126 | | if !visited.contains(&format!("{} {}",nr,nc)){ [INFO] [stdout] 127 | | stack.push(format!("{} {}",nr,nc)); [INFO] [stdout] 128 | | } [INFO] [stdout] 129 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 125 ~ if nr>-1 && nr<=maxr as i32 && nc>-1 && nc<=maxc as i32 && arr[nr as usize][nc as usize] == '.' [INFO] [stdout] 126 ~ && !visited.contains(&format!("{} {}",nr,nc)){ [INFO] [stdout] 127 | stack.push(format!("{} {}",nr,nc)); [INFO] [stdout] 128 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/bin/day18.rs:125:33 [INFO] [stdout] | [INFO] [stdout] 125 | if nr>-1 && nr<=maxr as i32 && nc>-1 && nc<=maxc as i32 && arr[nr as usize][nc as usize] == '.'{ [INFO] [stdout] | ^^^^^^^^^^^ help: try: `maxr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/bin/day18.rs:125:61 [INFO] [stdout] | [INFO] [stdout] 125 | if nr>-1 && nr<=maxr as i32 && nc>-1 && nc<=maxc as i32 && arr[nr as usize][nc as usize] == '.'{ [INFO] [stdout] | ^^^^^^^^^^^ help: try: `maxc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/bin/day2.rs:21:30 [INFO] [stdout] | [INFO] [stdout] 21 | let ele = rstr.split(|n| n==',' || n==';').collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `[',', ';']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `ele` [INFO] [stdout] --> src/bin/day2.rs:22:18 [INFO] [stdout] | [INFO] [stdout] 22 | for i in 0..ele.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 [INFO] [stdout] | [INFO] [stdout] 22 - for i in 0..ele.len(){ [INFO] [stdout] 22 + for in &ele{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `VecDeque` [INFO] [stdout] --> src/bin/day18.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{VecDeque, HashSet, HashMap}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/bin/day5_1.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/bin/day5_1.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: denote infinite loops with `loop { ... }` [INFO] [stdout] --> src/bin/day8.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | while true{ [INFO] [stdout] | ^^^^^^^^^^ help: use `loop` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(while_true)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this looks like an `else if` but the `else` is missing [INFO] [stdout] --> src/bin/day7.rs:68:10 [INFO] [stdout] | [INFO] [stdout] 68 | }if has_four==1{ [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: to remove this lint, add the missing `else` or add a new line before the second `if` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#possible_missing_else [INFO] [stdout] = note: `#[warn(clippy::possible_missing_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/bin/day6.rs:13:75 [INFO] [stdout] | [INFO] [stdout] 13 | let time = lines.next().unwrap().split(":").collect::>()[1].trim().split_whitespace().collect::>().join("").... [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> src/bin/day6.rs:14:79 [INFO] [stdout] | [INFO] [stdout] 14 | let distance = lines.next().unwrap().split(":").collect::>()[1].trim().split_whitespace().collect::>().join(... [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/day5_1.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | let mut seed = seed as i128; [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: function `first_main` is never used [INFO] [stdout] --> src/bin/day2.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn first_main(){ [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 looks like an `else if` but the `else` is missing [INFO] [stdout] --> src/bin/day7.rs:68:10 [INFO] [stdout] | [INFO] [stdout] 68 | }if has_four==1{ [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: to remove this lint, add the missing `else` or add a new line before the second `if` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#possible_missing_else [INFO] [stdout] = note: `#[warn(clippy::possible_missing_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.fold` can be written more succinctly using another method [INFO] [stdout] --> src/bin/day6.rs:24:31 [INFO] [stdout] | [INFO] [stdout] 24 | let ans = ans_ways.iter().fold(1,|acc,val| acc*val); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `product::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fold)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5_1.rs:17:11 [INFO] [stdout] | [INFO] [stdout] 17 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5_1.rs:26:11 [INFO] [stdout] | [INFO] [stdout] 26 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5_1.rs:35:11 [INFO] [stdout] | [INFO] [stdout] 35 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5_1.rs:44:11 [INFO] [stdout] | [INFO] [stdout] 44 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5_1.rs:54:11 [INFO] [stdout] | [INFO] [stdout] 54 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5_1.rs:64:11 [INFO] [stdout] | [INFO] [stdout] 64 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5_1.rs:74:11 [INFO] [stdout] | [INFO] [stdout] 74 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/bin/day5_1.rs:84:19 [INFO] [stdout] | [INFO] [stdout] 84 | let mut min = std::i128::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 84 - let mut min = std::i128::MAX; [INFO] [stdout] 84 + let mut min = i128::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:86:24 [INFO] [stdout] | [INFO] [stdout] 86 | let mut seed = seed as i128; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `seed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:95:25 [INFO] [stdout] | [INFO] [stdout] 95 | let start = i[1].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[1].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:96:31 [INFO] [stdout] | [INFO] [stdout] 96 | let end = start + i[2].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[2].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:97:23 [INFO] [stdout] | [INFO] [stdout] 97 | let val = i[0].parse::().expect("val parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[0].parse::().expect("val parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day5_1.rs:103:12 [INFO] [stdout] | [INFO] [stdout] 103 | if soil_no==None{soil_no = Some(seed);} [INFO] [stdout] | ^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `soil_no.is_none()` [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: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:105:25 [INFO] [stdout] | [INFO] [stdout] 105 | let start = i[1].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[1].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:106:31 [INFO] [stdout] | [INFO] [stdout] 106 | let end = start + i[2].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[2].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:107:23 [INFO] [stdout] | [INFO] [stdout] 107 | let val = i[0].parse::().expect("val parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[0].parse::().expect("val parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day5_1.rs:114:12 [INFO] [stdout] | [INFO] [stdout] 114 | if fert==None{fert = soil_no;} [INFO] [stdout] | ^^^^^^^^^^ help: use `Option::is_none()` instead: `fert.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:116:25 [INFO] [stdout] | [INFO] [stdout] 116 | let start = i[1].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[1].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:117:31 [INFO] [stdout] | [INFO] [stdout] 117 | let end = start + i[2].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[2].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:118:23 [INFO] [stdout] | [INFO] [stdout] 118 | let val = i[0].parse::().expect("val parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[0].parse::().expect("val parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day5_1.rs:125:12 [INFO] [stdout] | [INFO] [stdout] 125 | if wat==None{wat = fert;} [INFO] [stdout] | ^^^^^^^^^ help: use `Option::is_none()` instead: `wat.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/bin/day2.rs:21:30 [INFO] [stdout] | [INFO] [stdout] 21 | let ele = rstr.split(|n| n==',' || n==';').collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `[',', ';']` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_pattern_char_comparison [INFO] [stdout] = note: `#[warn(clippy::manual_pattern_char_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:127:25 [INFO] [stdout] | [INFO] [stdout] 127 | let start = i[1].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[1].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:128:31 [INFO] [stdout] | [INFO] [stdout] 128 | let end = start + i[2].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[2].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `ele` [INFO] [stdout] --> src/bin/day2.rs:22:18 [INFO] [stdout] | [INFO] [stdout] 22 | for i in 0..ele.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 [INFO] [stdout] | [INFO] [stdout] 22 - for i in 0..ele.len(){ [INFO] [stdout] 22 + for in &ele{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:129:23 [INFO] [stdout] | [INFO] [stdout] 129 | let val = i[0].parse::().expect("val parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[0].parse::().expect("val parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day5_1.rs:135:12 [INFO] [stdout] | [INFO] [stdout] 135 | if light==None{light = wat;} [INFO] [stdout] | ^^^^^^^^^^^ help: use `Option::is_none()` instead: `light.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:137:25 [INFO] [stdout] | [INFO] [stdout] 137 | let start = i[1].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[1].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:138:31 [INFO] [stdout] | [INFO] [stdout] 138 | let end = start + i[2].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[2].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:139:23 [INFO] [stdout] | [INFO] [stdout] 139 | let val = i[0].parse::().expect("val parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[0].parse::().expect("val parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day5_1.rs:145:12 [INFO] [stdout] | [INFO] [stdout] 145 | if temp==None{temp = light;} [INFO] [stdout] | ^^^^^^^^^^ help: use `Option::is_none()` instead: `temp.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:147:25 [INFO] [stdout] | [INFO] [stdout] 147 | let start = i[1].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[1].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:148:31 [INFO] [stdout] | [INFO] [stdout] 148 | let end = start + i[2].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[2].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:149:23 [INFO] [stdout] | [INFO] [stdout] 149 | let val = i[0].parse::().expect("val parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[0].parse::().expect("val parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day5_1.rs:154:13 [INFO] [stdout] | [INFO] [stdout] 154 | }if hum==None{hum=temp;} [INFO] [stdout] | ^^^^^^^^^ help: use `Option::is_none()` instead: `hum.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:156:25 [INFO] [stdout] | [INFO] [stdout] 156 | let start = i[1].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[1].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:157:31 [INFO] [stdout] | [INFO] [stdout] 157 | let end = start + i[2].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[2].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:158:23 [INFO] [stdout] | [INFO] [stdout] 158 | let val = i[0].parse::().expect("val parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[0].parse::().expect("val parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day5_1.rs:164:13 [INFO] [stdout] | [INFO] [stdout] 164 | }if loc==None{loc=hum;} [INFO] [stdout] | ^^^^^^^^^ help: use `Option::is_none()` instead: `loc.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/day18.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 32 | let mut depth = col.join(""); [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: unused variable: `r` [INFO] [stdout] --> src/bin/day18.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | for r in 0..maxr+1{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/bin/day18.rs:90:13 [INFO] [stdout] | [INFO] [stdout] 90 | for c in 0..maxc+1{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `colref` [INFO] [stdout] --> src/bin/day18.rs:27:18 [INFO] [stdout] | [INFO] [stdout] 27 | for i in 3..colref.len()-2{ [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 [INFO] [stdout] | [INFO] [stdout] 27 - for i in 3..colref.len()-2{ [INFO] [stdout] 27 + for in colref.iter().take(colref.len()-2).skip(3){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day18.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | return dug_clone; [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] 80 - return dug_clone; [INFO] [stdout] 80 + dug_clone [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day18.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 75 | cord[0] = cord[0] - minrow; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cord[0] -= minrow` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day18.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | cord[1] = cord[1] - mincol; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `cord[1] -= mincol` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/day18.rs:114:11 [INFO] [stdout] | [INFO] [stdout] 114 | while stack.len()>0{ [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!stack.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/bin/day18.rs:125:17 [INFO] [stdout] | [INFO] [stdout] 125 | / if nr>-1 && nr<=maxr as i32 && nc>-1 && nc<=maxc as i32 && arr[nr as usize][nc as usize] == '.'{ [INFO] [stdout] 126 | | if !visited.contains(&format!("{} {}",nr,nc)){ [INFO] [stdout] 127 | | stack.push(format!("{} {}",nr,nc)); [INFO] [stdout] 128 | | } [INFO] [stdout] 129 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 125 ~ if nr>-1 && nr<=maxr as i32 && nc>-1 && nc<=maxc as i32 && arr[nr as usize][nc as usize] == '.' [INFO] [stdout] 126 ~ && !visited.contains(&format!("{} {}",nr,nc)){ [INFO] [stdout] 127 | stack.push(format!("{} {}",nr,nc)); [INFO] [stdout] 128 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/bin/day18.rs:125:33 [INFO] [stdout] | [INFO] [stdout] 125 | if nr>-1 && nr<=maxr as i32 && nc>-1 && nc<=maxc as i32 && arr[nr as usize][nc as usize] == '.'{ [INFO] [stdout] | ^^^^^^^^^^^ help: try: `maxr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i32` -> `i32`) [INFO] [stdout] --> src/bin/day18.rs:125:61 [INFO] [stdout] | [INFO] [stdout] 125 | if nr>-1 && nr<=maxr as i32 && nc>-1 && nc<=maxc as i32 && arr[nr as usize][nc as usize] == '.'{ [INFO] [stdout] | ^^^^^^^^^^^ help: try: `maxc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `row_index` is used as a loop counter [INFO] [stdout] --> src/bin/day10.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | for line in content.lines(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (row_index, line) in content.lines().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `ele` is only used to index `elemenets` [INFO] [stdout] --> src/bin/day10.rs:20:20 [INFO] [stdout] | [INFO] [stdout] 20 | for ele in 1..elemenets.len()-1{ [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 [INFO] [stdout] | [INFO] [stdout] 20 - for ele in 1..elemenets.len()-1{ [INFO] [stdout] 20 + for in elemenets.iter().take(elemenets.len()-1).skip(1){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `col_index` is used as a loop counter [INFO] [stdout] --> src/bin/day10.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | for ele in 1..elemenets.len()-1{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (col_index, ele) in (1..elemenets.len()-1).enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day10.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | return breaker; [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] 73 - return breaker; [INFO] [stdout] 73 + breaker [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/day10.rs:75:11 [INFO] [stdout] | [INFO] [stdout] 75 | while stack.len()>0{ [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!stack.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/bin/day10.rs:95:31 [INFO] [stdout] | [INFO] [stdout] 95 | let breaker = if ele=="S" {true} else {false}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `ele == "S"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/bin/day10.rs:98:20 [INFO] [stdout] | [INFO] [stdout] 98 | if combat_result==false {continue;} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `!combat_result` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::str::Chars<'_>` [INFO] [stdout] --> src/bin/day8.rs:12:19 [INFO] [stdout] | [INFO] [stdout] 12 | let pattern = line_it.next().unwrap().chars().into_iter().collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `line_it.next().unwrap().chars()` [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] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/day5_1.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 86 | let mut seed = seed as i128; [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: manual implementation of an assign operation [INFO] [stdout] --> src/bin/day8.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | index = index+1; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `index += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5_1.rs:17:11 [INFO] [stdout] | [INFO] [stdout] 17 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5_1.rs:26:11 [INFO] [stdout] | [INFO] [stdout] 26 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5_1.rs:35:11 [INFO] [stdout] | [INFO] [stdout] 35 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5_1.rs:44:11 [INFO] [stdout] | [INFO] [stdout] 44 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5_1.rs:54:11 [INFO] [stdout] | [INFO] [stdout] 54 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5_1.rs:64:11 [INFO] [stdout] | [INFO] [stdout] 64 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5_1.rs:74:11 [INFO] [stdout] | [INFO] [stdout] 74 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/bin/day5_1.rs:84:19 [INFO] [stdout] | [INFO] [stdout] 84 | let mut min = std::i128::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 84 - let mut min = std::i128::MAX; [INFO] [stdout] 84 + let mut min = i128::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:86:24 [INFO] [stdout] | [INFO] [stdout] 86 | let mut seed = seed as i128; [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `seed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:95:25 [INFO] [stdout] | [INFO] [stdout] 95 | let start = i[1].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[1].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:96:31 [INFO] [stdout] | [INFO] [stdout] 96 | let end = start + i[2].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[2].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:97:23 [INFO] [stdout] | [INFO] [stdout] 97 | let val = i[0].parse::().expect("val parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[0].parse::().expect("val parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day5_1.rs:103:12 [INFO] [stdout] | [INFO] [stdout] 103 | if soil_no==None{soil_no = Some(seed);} [INFO] [stdout] | ^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `soil_no.is_none()` [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: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:105:25 [INFO] [stdout] | [INFO] [stdout] 105 | let start = i[1].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[1].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:106:31 [INFO] [stdout] | [INFO] [stdout] 106 | let end = start + i[2].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[2].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:107:23 [INFO] [stdout] | [INFO] [stdout] 107 | let val = i[0].parse::().expect("val parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[0].parse::().expect("val parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day5_1.rs:114:12 [INFO] [stdout] | [INFO] [stdout] 114 | if fert==None{fert = soil_no;} [INFO] [stdout] | ^^^^^^^^^^ help: use `Option::is_none()` instead: `fert.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:116:25 [INFO] [stdout] | [INFO] [stdout] 116 | let start = i[1].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[1].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:117:31 [INFO] [stdout] | [INFO] [stdout] 117 | let end = start + i[2].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[2].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:118:23 [INFO] [stdout] | [INFO] [stdout] 118 | let val = i[0].parse::().expect("val parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[0].parse::().expect("val parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day5_1.rs:125:12 [INFO] [stdout] | [INFO] [stdout] 125 | if wat==None{wat = fert;} [INFO] [stdout] | ^^^^^^^^^ help: use `Option::is_none()` instead: `wat.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:127:25 [INFO] [stdout] | [INFO] [stdout] 127 | let start = i[1].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[1].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:128:31 [INFO] [stdout] | [INFO] [stdout] 128 | let end = start + i[2].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[2].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:129:23 [INFO] [stdout] | [INFO] [stdout] 129 | let val = i[0].parse::().expect("val parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[0].parse::().expect("val parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day5_1.rs:135:12 [INFO] [stdout] | [INFO] [stdout] 135 | if light==None{light = wat;} [INFO] [stdout] | ^^^^^^^^^^^ help: use `Option::is_none()` instead: `light.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:137:25 [INFO] [stdout] | [INFO] [stdout] 137 | let start = i[1].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[1].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:138:31 [INFO] [stdout] | [INFO] [stdout] 138 | let end = start + i[2].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[2].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:139:23 [INFO] [stdout] | [INFO] [stdout] 139 | let val = i[0].parse::().expect("val parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[0].parse::().expect("val parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day5_1.rs:145:12 [INFO] [stdout] | [INFO] [stdout] 145 | if temp==None{temp = light;} [INFO] [stdout] | ^^^^^^^^^^ help: use `Option::is_none()` instead: `temp.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:147:25 [INFO] [stdout] | [INFO] [stdout] 147 | let start = i[1].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[1].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:148:31 [INFO] [stdout] | [INFO] [stdout] 148 | let end = start + i[2].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[2].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:149:23 [INFO] [stdout] | [INFO] [stdout] 149 | let val = i[0].parse::().expect("val parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[0].parse::().expect("val parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day5_1.rs:154:13 [INFO] [stdout] | [INFO] [stdout] 154 | }if hum==None{hum=temp;} [INFO] [stdout] | ^^^^^^^^^ help: use `Option::is_none()` instead: `hum.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:156:25 [INFO] [stdout] | [INFO] [stdout] 156 | let start = i[1].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[1].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:157:31 [INFO] [stdout] | [INFO] [stdout] 157 | let end = start + i[2].parse::().expect("start parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[2].parse::().expect("start parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i128` -> `i128`) [INFO] [stdout] --> src/bin/day5_1.rs:158:23 [INFO] [stdout] | [INFO] [stdout] 158 | let val = i[0].parse::().expect("val parse error") as i128; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i[0].parse::().expect("val parse error")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/bin/day5_1.rs:164:13 [INFO] [stdout] | [INFO] [stdout] 164 | }if loc==None{loc=hum;} [INFO] [stdout] | ^^^^^^^^^ help: use `Option::is_none()` instead: `loc.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `k` [INFO] [stdout] --> src/bin/day7.rs:51:14 [INFO] [stdout] | [INFO] [stdout] 51 | for (k,v) in map{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day7.rs:110:17 [INFO] [stdout] | [INFO] [stdout] 110 | return bval.cmp(&aval); [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] 110 - return bval.cmp(&aval); [INFO] [stdout] 110 + bval.cmp(&aval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day7.rs:110:33 [INFO] [stdout] | [INFO] [stdout] 110 | return bval.cmp(&aval); [INFO] [stdout] | ^^^^^ help: change this to: `aval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day7.rs:131:17 [INFO] [stdout] | [INFO] [stdout] 131 | return bval.cmp(&aval); [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] 131 - return bval.cmp(&aval); [INFO] [stdout] 131 + bval.cmp(&aval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day7.rs:131:33 [INFO] [stdout] | [INFO] [stdout] 131 | return bval.cmp(&aval); [INFO] [stdout] | ^^^^^ help: change this to: `aval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day7.rs:153:17 [INFO] [stdout] | [INFO] [stdout] 153 | return bval.cmp(&aval); [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] 153 - return bval.cmp(&aval); [INFO] [stdout] 153 + bval.cmp(&aval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day7.rs:153:33 [INFO] [stdout] | [INFO] [stdout] 153 | return bval.cmp(&aval); [INFO] [stdout] | ^^^^^ help: change this to: `aval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/bin/day1.rs:50:16 [INFO] [stdout] | [INFO] [stdout] 50 | if i.is_digit(10) && (index as f32) src/bin/day7.rs:174:17 [INFO] [stdout] | [INFO] [stdout] 174 | return bval.cmp(&aval); [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] 174 - return bval.cmp(&aval); [INFO] [stdout] 174 + bval.cmp(&aval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day7.rs:174:33 [INFO] [stdout] | [INFO] [stdout] 174 | return bval.cmp(&aval); [INFO] [stdout] | ^^^^^ help: change this to: `aval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day7.rs:195:17 [INFO] [stdout] | [INFO] [stdout] 195 | return bval.cmp(&aval); [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] 195 - return bval.cmp(&aval); [INFO] [stdout] 195 + bval.cmp(&aval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day7.rs:195:33 [INFO] [stdout] | [INFO] [stdout] 195 | return bval.cmp(&aval); [INFO] [stdout] | ^^^^^ help: change this to: `aval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day7.rs:216:17 [INFO] [stdout] | [INFO] [stdout] 216 | return bval.cmp(&aval); [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] 216 - return bval.cmp(&aval); [INFO] [stdout] 216 + bval.cmp(&aval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day7.rs:216:33 [INFO] [stdout] | [INFO] [stdout] 216 | return bval.cmp(&aval); [INFO] [stdout] | ^^^^^ help: change this to: `aval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/bin/day1.rs:59:16 [INFO] [stdout] | [INFO] [stdout] 59 | if i.is_digit(10) && (index as f32)>last_str.0{ [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `i.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] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day7.rs:237:17 [INFO] [stdout] | [INFO] [stdout] 237 | return bval.cmp(&aval); [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] 237 - return bval.cmp(&aval); [INFO] [stdout] 237 + bval.cmp(&aval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day7.rs:237:33 [INFO] [stdout] | [INFO] [stdout] 237 | return bval.cmp(&aval); [INFO] [stdout] | ^^^^^ help: change this to: `aval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/bin/day1.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | if index>0 {index -=1;} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `index = index.saturating_sub(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] = note: `#[warn(clippy::implicit_saturating_sub)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `first_main` is never used [INFO] [stdout] --> src/bin/day3.rs:56:4 [INFO] [stdout] | [INFO] [stdout] 56 | fn first_main(){ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/bin/day1.rs:50:16 [INFO] [stdout] | [INFO] [stdout] 50 | if i.is_digit(10) && (index as f32) src/bin/day1.rs:59:16 [INFO] [stdout] | [INFO] [stdout] 59 | if i.is_digit(10) && (index as f32)>last_str.0{ [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `i.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] [INFO] [stdout] [INFO] [stdout] warning: implicitly performing saturating subtraction [INFO] [stdout] --> src/bin/day1.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | if index>0 {index -=1;} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `index = index.saturating_sub(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_saturating_sub [INFO] [stdout] = note: `#[warn(clippy::implicit_saturating_sub)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day3.rs:26:16 [INFO] [stdout] | [INFO] [stdout] 26 | if !(inp[row][col]=='*'){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `(inp[row][col] != '*')` [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: the variable `row_index` is used as a loop counter [INFO] [stdout] --> src/bin/day10.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | for line in content.lines(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (row_index, line) in content.lines().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `ele` is only used to index `elemenets` [INFO] [stdout] --> src/bin/day10.rs:20:20 [INFO] [stdout] | [INFO] [stdout] 20 | for ele in 1..elemenets.len()-1{ [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 [INFO] [stdout] | [INFO] [stdout] 20 - for ele in 1..elemenets.len()-1{ [INFO] [stdout] 20 + for in elemenets.iter().take(elemenets.len()-1).skip(1){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `col_index` is used as a loop counter [INFO] [stdout] --> src/bin/day10.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | for ele in 1..elemenets.len()-1{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (col_index, ele) in (1..elemenets.len()-1).enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day10.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | return breaker; [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] 73 - return breaker; [INFO] [stdout] 73 + breaker [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/bin/day10.rs:75:11 [INFO] [stdout] | [INFO] [stdout] 75 | while stack.len()>0{ [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!stack.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> src/bin/day10.rs:95:31 [INFO] [stdout] | [INFO] [stdout] 95 | let breaker = if ele=="S" {true} else {false}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `ele == "S"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against false can be replaced by a negation [INFO] [stdout] --> src/bin/day10.rs:98:20 [INFO] [stdout] | [INFO] [stdout] 98 | if combat_result==false {continue;} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `!combat_result` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_comparison)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/bin/day3.rs:33:141 [INFO] [stdout] | [INFO] [stdout] 33 | ...as_str()) && inp[nr as usize][nc as usize].is_digit(10){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `inp[nr as usize][nc as usize].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: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/bin/day3.rs:35:64 [INFO] [stdout] | [INFO] [stdout] 35 | while nc>-1 && nc<(inp[0].len() as i32) && inp[nr as usize][nc as usize].is_digit(10){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `inp[nr as usize][nc as usize].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] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/bin/day3.rs:39:35 [INFO] [stdout] | [INFO] [stdout] 39 | if nc==-1 || !(inp[nr as usize][nc as usize].is_digit(10)){nc+=1} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `inp[nr as usize][nc as usize].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] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/bin/day3.rs:40:57 [INFO] [stdout] | [INFO] [stdout] 40 | while (nc as usize) src/bin/day3.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | return !c.is_alphabetic() && !c.is_numeric() && !c.is_whitespace(); [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] 58 - return !c.is_alphabetic() && !c.is_numeric() && !c.is_whitespace(); [INFO] [stdout] 58 + !c.is_alphabetic() && !c.is_numeric() && !c.is_whitespace() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/bin/day3.rs:79:39 [INFO] [stdout] | [INFO] [stdout] 79 | while col src/bin/day3.rs:96:43 [INFO] [stdout] | [INFO] [stdout] 96 | ans += str.parse::().expect(format!("can't parse string to int {}",str).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("can't parse string to int {}",str))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5.rs:17:11 [INFO] [stdout] | [INFO] [stdout] 17 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5.rs:33:11 [INFO] [stdout] | [INFO] [stdout] 33 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5.rs:49:11 [INFO] [stdout] | [INFO] [stdout] 49 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `k` [INFO] [stdout] --> src/bin/day7.rs:51:14 [INFO] [stdout] | [INFO] [stdout] 51 | for (k,v) in map{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5.rs:65:11 [INFO] [stdout] | [INFO] [stdout] 65 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5.rs:82:11 [INFO] [stdout] | [INFO] [stdout] 82 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5.rs:99:11 [INFO] [stdout] | [INFO] [stdout] 99 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5.rs:116:11 [INFO] [stdout] | [INFO] [stdout] 116 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/bin/day5.rs:133:19 [INFO] [stdout] | [INFO] [stdout] 133 | let mut min = std::u128::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 133 - let mut min = std::u128::MAX; [INFO] [stdout] 133 + let mut min = u128::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day5.rs:136:9 [INFO] [stdout] | [INFO] [stdout] 136 | let soil_no; [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 `soil_no` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 136 ~ [INFO] [stdout] 137 | let fert; [INFO] [stdout] ... [INFO] [stdout] 142 | let loc; [INFO] [stdout] 143 ~ let soil_no = if ssm.contains_key(&i){ [INFO] [stdout] 144 ~ ssm.get(&i).expect("can't get soil number") [INFO] [stdout] 145 ~ }else{&i}; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day5.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | let fert; [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] help: move the declaration `fert` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 137 ~ [INFO] [stdout] 138 | let wat; [INFO] [stdout] ... [INFO] [stdout] 145 | }else{soil_no = &i;} [INFO] [stdout] 146 ~ let fert = if sfm.contains_key(&soil_no){ [INFO] [stdout] 147 ~ sfm.get(&soil_no).expect("can't get fert number") [INFO] [stdout] 148 ~ }else{&soil_no}; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day5.rs:138:9 [INFO] [stdout] | [INFO] [stdout] 138 | let wat; [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] help: move the declaration `wat` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 138 ~ [INFO] [stdout] 139 | let light; [INFO] [stdout] ... [INFO] [stdout] 148 | }else{fert = &soil_no;} [INFO] [stdout] 149 ~ let wat = if fwm.contains_key(&fert){ [INFO] [stdout] 150 ~ fwm.get(&fert).expect("can't get wat number") [INFO] [stdout] 151 ~ }else{&fert}; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day5.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | let light; [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] help: move the declaration `light` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 139 ~ [INFO] [stdout] 140 | let temp; [INFO] [stdout] ... [INFO] [stdout] 151 | }else{wat = &fert;} [INFO] [stdout] 152 ~ let light = if wlm.contains_key(&wat){ [INFO] [stdout] 153 ~ wlm.get(&wat).expect("can't get light number") [INFO] [stdout] 154 ~ }else{&fert}; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day5.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | let temp; [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] help: move the declaration `temp` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 140 ~ [INFO] [stdout] 141 | let hum; [INFO] [stdout] ... [INFO] [stdout] 154 | }else{light = &fert;} [INFO] [stdout] 155 ~ let temp = if ltm.contains_key(&light){ [INFO] [stdout] 156 ~ ltm.get(&light).expect("can't get temp number") [INFO] [stdout] 157 ~ }else{&light}; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day5.rs:141:9 [INFO] [stdout] | [INFO] [stdout] 141 | let hum; [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] help: move the declaration `hum` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 141 ~ [INFO] [stdout] 142 | let loc; [INFO] [stdout] ... [INFO] [stdout] 157 | }else{temp = &light;} [INFO] [stdout] 158 ~ let hum = if thm.contains_key(&temp){ [INFO] [stdout] 159 ~ thm.get(&temp).expect("can't get hum number") [INFO] [stdout] 160 ~ }else{&temp}; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day5.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | let loc; [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] help: move the declaration `loc` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 142 ~ [INFO] [stdout] 143 | if ssm.contains_key(&i){ [INFO] [stdout] ... [INFO] [stdout] 160 | }else{hum = &temp;} [INFO] [stdout] 161 ~ let loc = if hlm.contains_key(&hum){ [INFO] [stdout] 162 ~ hlm.get(&hum).expect("can't get hum number") [INFO] [stdout] 163 ~ }else{&hum}; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:146:29 [INFO] [stdout] | [INFO] [stdout] 146 | if sfm.contains_key(&soil_no){ [INFO] [stdout] | ^^^^^^^^ help: change this to: `soil_no` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:147:28 [INFO] [stdout] | [INFO] [stdout] 147 | fert = sfm.get(&soil_no).expect("can't get fert number"); [INFO] [stdout] | ^^^^^^^^ help: change this to: `soil_no` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:148:22 [INFO] [stdout] | [INFO] [stdout] 148 | }else{fert = &soil_no;} [INFO] [stdout] | ^^^^^^^^ help: change this to: `soil_no` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:149:29 [INFO] [stdout] | [INFO] [stdout] 149 | if fwm.contains_key(&fert){ [INFO] [stdout] | ^^^^^ help: change this to: `fert` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:150:27 [INFO] [stdout] | [INFO] [stdout] 150 | wat = fwm.get(&fert).expect("can't get wat number"); [INFO] [stdout] | ^^^^^ help: change this to: `fert` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:151:21 [INFO] [stdout] | [INFO] [stdout] 151 | }else{wat = &fert;} [INFO] [stdout] | ^^^^^ help: change this to: `fert` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:152:29 [INFO] [stdout] | [INFO] [stdout] 152 | if wlm.contains_key(&wat){ [INFO] [stdout] | ^^^^ help: change this to: `wat` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:153:29 [INFO] [stdout] | [INFO] [stdout] 153 | light = wlm.get(&wat).expect("can't get light number"); [INFO] [stdout] | ^^^^ help: change this to: `wat` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:154:23 [INFO] [stdout] | [INFO] [stdout] 154 | }else{light = &fert;} [INFO] [stdout] | ^^^^^ help: change this to: `fert` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:155:29 [INFO] [stdout] | [INFO] [stdout] 155 | if ltm.contains_key(&light){ [INFO] [stdout] | ^^^^^^ help: change this to: `light` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:156:28 [INFO] [stdout] | [INFO] [stdout] 156 | temp = ltm.get(&light).expect("can't get temp number"); [INFO] [stdout] | ^^^^^^ help: change this to: `light` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:157:22 [INFO] [stdout] | [INFO] [stdout] 157 | }else{temp = &light;} [INFO] [stdout] | ^^^^^^ help: change this to: `light` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:158:29 [INFO] [stdout] | [INFO] [stdout] 158 | if thm.contains_key(&temp){ [INFO] [stdout] | ^^^^^ help: change this to: `temp` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:159:27 [INFO] [stdout] | [INFO] [stdout] 159 | hum = thm.get(&temp).expect("can't get hum number"); [INFO] [stdout] | ^^^^^ help: change this to: `temp` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:160:21 [INFO] [stdout] | [INFO] [stdout] 160 | }else{hum = &temp;} [INFO] [stdout] | ^^^^^ help: change this to: `temp` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:161:29 [INFO] [stdout] | [INFO] [stdout] 161 | if hlm.contains_key(&hum){ [INFO] [stdout] | ^^^^ help: change this to: `hum` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:162:27 [INFO] [stdout] | [INFO] [stdout] 162 | loc = hlm.get(&hum).expect("can't get hum number"); [INFO] [stdout] | ^^^^ help: change this to: `hum` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:163:21 [INFO] [stdout] | [INFO] [stdout] 163 | }else{loc = &hum;} [INFO] [stdout] | ^^^^ help: change this to: `hum` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5.rs:17:11 [INFO] [stdout] | [INFO] [stdout] 17 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5.rs:33:11 [INFO] [stdout] | [INFO] [stdout] 33 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5.rs:49:11 [INFO] [stdout] | [INFO] [stdout] 49 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5.rs:65:11 [INFO] [stdout] | [INFO] [stdout] 65 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5.rs:82:11 [INFO] [stdout] | [INFO] [stdout] 82 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5.rs:99:11 [INFO] [stdout] | [INFO] [stdout] 99 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/bin/day5.rs:116:11 [INFO] [stdout] | [INFO] [stdout] 116 | while ""!=cur_line{ [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cur_line.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/bin/day5.rs:133:19 [INFO] [stdout] | [INFO] [stdout] 133 | let mut min = std::u128::MAX; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 133 - let mut min = std::u128::MAX; [INFO] [stdout] 133 + let mut min = u128::MAX; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day5.rs:136:9 [INFO] [stdout] | [INFO] [stdout] 136 | let soil_no; [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 `soil_no` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 136 ~ [INFO] [stdout] 137 | let fert; [INFO] [stdout] ... [INFO] [stdout] 142 | let loc; [INFO] [stdout] 143 ~ let soil_no = if ssm.contains_key(&i){ [INFO] [stdout] 144 ~ ssm.get(&i).expect("can't get soil number") [INFO] [stdout] 145 ~ }else{&i}; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day5.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | let fert; [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] help: move the declaration `fert` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 137 ~ [INFO] [stdout] 138 | let wat; [INFO] [stdout] ... [INFO] [stdout] 145 | }else{soil_no = &i;} [INFO] [stdout] 146 ~ let fert = if sfm.contains_key(&soil_no){ [INFO] [stdout] 147 ~ sfm.get(&soil_no).expect("can't get fert number") [INFO] [stdout] 148 ~ }else{&soil_no}; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day5.rs:138:9 [INFO] [stdout] | [INFO] [stdout] 138 | let wat; [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] help: move the declaration `wat` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 138 ~ [INFO] [stdout] 139 | let light; [INFO] [stdout] ... [INFO] [stdout] 148 | }else{fert = &soil_no;} [INFO] [stdout] 149 ~ let wat = if fwm.contains_key(&fert){ [INFO] [stdout] 150 ~ fwm.get(&fert).expect("can't get wat number") [INFO] [stdout] 151 ~ }else{&fert}; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day5.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | let light; [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] help: move the declaration `light` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 139 ~ [INFO] [stdout] 140 | let temp; [INFO] [stdout] ... [INFO] [stdout] 151 | }else{wat = &fert;} [INFO] [stdout] 152 ~ let light = if wlm.contains_key(&wat){ [INFO] [stdout] 153 ~ wlm.get(&wat).expect("can't get light number") [INFO] [stdout] 154 ~ }else{&fert}; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day5.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | let temp; [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] help: move the declaration `temp` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 140 ~ [INFO] [stdout] 141 | let hum; [INFO] [stdout] ... [INFO] [stdout] 154 | }else{light = &fert;} [INFO] [stdout] 155 ~ let temp = if ltm.contains_key(&light){ [INFO] [stdout] 156 ~ ltm.get(&light).expect("can't get temp number") [INFO] [stdout] 157 ~ }else{&light}; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day5.rs:141:9 [INFO] [stdout] | [INFO] [stdout] 141 | let hum; [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] help: move the declaration `hum` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 141 ~ [INFO] [stdout] 142 | let loc; [INFO] [stdout] ... [INFO] [stdout] 157 | }else{temp = &light;} [INFO] [stdout] 158 ~ let hum = if thm.contains_key(&temp){ [INFO] [stdout] 159 ~ thm.get(&temp).expect("can't get hum number") [INFO] [stdout] 160 ~ }else{&temp}; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/bin/day5.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | let loc; [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] help: move the declaration `loc` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 142 ~ [INFO] [stdout] 143 | if ssm.contains_key(&i){ [INFO] [stdout] ... [INFO] [stdout] 160 | }else{hum = &temp;} [INFO] [stdout] 161 ~ let loc = if hlm.contains_key(&hum){ [INFO] [stdout] 162 ~ hlm.get(&hum).expect("can't get hum number") [INFO] [stdout] 163 ~ }else{&hum}; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:146:29 [INFO] [stdout] | [INFO] [stdout] 146 | if sfm.contains_key(&soil_no){ [INFO] [stdout] | ^^^^^^^^ help: change this to: `soil_no` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:147:28 [INFO] [stdout] | [INFO] [stdout] 147 | fert = sfm.get(&soil_no).expect("can't get fert number"); [INFO] [stdout] | ^^^^^^^^ help: change this to: `soil_no` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:148:22 [INFO] [stdout] | [INFO] [stdout] 148 | }else{fert = &soil_no;} [INFO] [stdout] | ^^^^^^^^ help: change this to: `soil_no` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:149:29 [INFO] [stdout] | [INFO] [stdout] 149 | if fwm.contains_key(&fert){ [INFO] [stdout] | ^^^^^ help: change this to: `fert` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:150:27 [INFO] [stdout] | [INFO] [stdout] 150 | wat = fwm.get(&fert).expect("can't get wat number"); [INFO] [stdout] | ^^^^^ help: change this to: `fert` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:151:21 [INFO] [stdout] | [INFO] [stdout] 151 | }else{wat = &fert;} [INFO] [stdout] | ^^^^^ help: change this to: `fert` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:152:29 [INFO] [stdout] | [INFO] [stdout] 152 | if wlm.contains_key(&wat){ [INFO] [stdout] | ^^^^ help: change this to: `wat` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:153:29 [INFO] [stdout] | [INFO] [stdout] 153 | light = wlm.get(&wat).expect("can't get light number"); [INFO] [stdout] | ^^^^ help: change this to: `wat` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:154:23 [INFO] [stdout] | [INFO] [stdout] 154 | }else{light = &fert;} [INFO] [stdout] | ^^^^^ help: change this to: `fert` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:155:29 [INFO] [stdout] | [INFO] [stdout] 155 | if ltm.contains_key(&light){ [INFO] [stdout] | ^^^^^^ help: change this to: `light` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:156:28 [INFO] [stdout] | [INFO] [stdout] 156 | temp = ltm.get(&light).expect("can't get temp number"); [INFO] [stdout] | ^^^^^^ help: change this to: `light` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:157:22 [INFO] [stdout] | [INFO] [stdout] 157 | }else{temp = &light;} [INFO] [stdout] | ^^^^^^ help: change this to: `light` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:158:29 [INFO] [stdout] | [INFO] [stdout] 158 | if thm.contains_key(&temp){ [INFO] [stdout] | ^^^^^ help: change this to: `temp` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:159:27 [INFO] [stdout] | [INFO] [stdout] 159 | hum = thm.get(&temp).expect("can't get hum number"); [INFO] [stdout] | ^^^^^ help: change this to: `temp` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:160:21 [INFO] [stdout] | [INFO] [stdout] 160 | }else{hum = &temp;} [INFO] [stdout] | ^^^^^ help: change this to: `temp` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:161:29 [INFO] [stdout] | [INFO] [stdout] 161 | if hlm.contains_key(&hum){ [INFO] [stdout] | ^^^^ help: change this to: `hum` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:162:27 [INFO] [stdout] | [INFO] [stdout] 162 | loc = hlm.get(&hum).expect("can't get hum number"); [INFO] [stdout] | ^^^^ help: change this to: `hum` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day5.rs:163:21 [INFO] [stdout] | [INFO] [stdout] 163 | }else{loc = &hum;} [INFO] [stdout] | ^^^^ help: change this to: `hum` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `first_main` is never used [INFO] [stdout] --> src/bin/day3.rs:56:4 [INFO] [stdout] | [INFO] [stdout] 56 | fn first_main(){ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day7.rs:110:17 [INFO] [stdout] | [INFO] [stdout] 110 | return bval.cmp(&aval); [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] 110 - return bval.cmp(&aval); [INFO] [stdout] 110 + bval.cmp(&aval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day7.rs:110:33 [INFO] [stdout] | [INFO] [stdout] 110 | return bval.cmp(&aval); [INFO] [stdout] | ^^^^^ help: change this to: `aval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day7.rs:131:17 [INFO] [stdout] | [INFO] [stdout] 131 | return bval.cmp(&aval); [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] 131 - return bval.cmp(&aval); [INFO] [stdout] 131 + bval.cmp(&aval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day7.rs:131:33 [INFO] [stdout] | [INFO] [stdout] 131 | return bval.cmp(&aval); [INFO] [stdout] | ^^^^^ help: change this to: `aval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day7.rs:153:17 [INFO] [stdout] | [INFO] [stdout] 153 | return bval.cmp(&aval); [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] 153 - return bval.cmp(&aval); [INFO] [stdout] 153 + bval.cmp(&aval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day7.rs:153:33 [INFO] [stdout] | [INFO] [stdout] 153 | return bval.cmp(&aval); [INFO] [stdout] | ^^^^^ help: change this to: `aval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day7.rs:174:17 [INFO] [stdout] | [INFO] [stdout] 174 | return bval.cmp(&aval); [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] 174 - return bval.cmp(&aval); [INFO] [stdout] 174 + bval.cmp(&aval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day7.rs:174:33 [INFO] [stdout] | [INFO] [stdout] 174 | return bval.cmp(&aval); [INFO] [stdout] | ^^^^^ help: change this to: `aval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/bin/day3.rs:26:16 [INFO] [stdout] | [INFO] [stdout] 26 | if !(inp[row][col]=='*'){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `(inp[row][col] != '*')` [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: unneeded `return` statement [INFO] [stdout] --> src/bin/day7.rs:195:17 [INFO] [stdout] | [INFO] [stdout] 195 | return bval.cmp(&aval); [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] 195 - return bval.cmp(&aval); [INFO] [stdout] 195 + bval.cmp(&aval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day7.rs:195:33 [INFO] [stdout] | [INFO] [stdout] 195 | return bval.cmp(&aval); [INFO] [stdout] | ^^^^^ help: change this to: `aval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day7.rs:216:17 [INFO] [stdout] | [INFO] [stdout] 216 | return bval.cmp(&aval); [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] 216 - return bval.cmp(&aval); [INFO] [stdout] 216 + bval.cmp(&aval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day7.rs:216:33 [INFO] [stdout] | [INFO] [stdout] 216 | return bval.cmp(&aval); [INFO] [stdout] | ^^^^^ help: change this to: `aval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bin/day7.rs:237:17 [INFO] [stdout] | [INFO] [stdout] 237 | return bval.cmp(&aval); [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] 237 - return bval.cmp(&aval); [INFO] [stdout] 237 + bval.cmp(&aval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/bin/day3.rs:33:141 [INFO] [stdout] | [INFO] [stdout] 33 | ...as_str()) && inp[nr as usize][nc as usize].is_digit(10){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `inp[nr as usize][nc as usize].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: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/bin/day3.rs:35:64 [INFO] [stdout] | [INFO] [stdout] 35 | while nc>-1 && nc<(inp[0].len() as i32) && inp[nr as usize][nc as usize].is_digit(10){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `inp[nr as usize][nc as usize].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] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/bin/day3.rs:39:35 [INFO] [stdout] | [INFO] [stdout] 39 | if nc==-1 || !(inp[nr as usize][nc as usize].is_digit(10)){nc+=1} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `inp[nr as usize][nc as usize].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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/bin/day7.rs:237:33 [INFO] [stdout] | [INFO] [stdout] 237 | return bval.cmp(&aval); [INFO] [stdout] | ^^^^^ help: change this to: `aval` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/bin/day3.rs:40:57 [INFO] [stdout] | [INFO] [stdout] 40 | while (nc as usize) src/bin/day3.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | return !c.is_alphabetic() && !c.is_numeric() && !c.is_whitespace(); [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] 58 - return !c.is_alphabetic() && !c.is_numeric() && !c.is_whitespace(); [INFO] [stdout] 58 + !c.is_alphabetic() && !c.is_numeric() && !c.is_whitespace() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 10 [INFO] [stdout] --> src/bin/day3.rs:79:39 [INFO] [stdout] | [INFO] [stdout] 79 | while col src/bin/day3.rs:96:43 [INFO] [stdout] | [INFO] [stdout] 96 | ans += str.parse::().expect(format!("can't parse string to int {}",str).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("can't parse string to int {}",str))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 8.39s [INFO] running `Command { std: "docker" "inspect" "62936390beb84e512f87a2b6958fe456046613702917ffc1e01150c1ae0689a9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "62936390beb84e512f87a2b6958fe456046613702917ffc1e01150c1ae0689a9", kill_on_drop: false }` [INFO] [stdout] 62936390beb84e512f87a2b6958fe456046613702917ffc1e01150c1ae0689a9