[INFO] cloning repository https://github.com/playmer/AoC2020 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/playmer/AoC2020" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fplaymer%2FAoC2020", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fplaymer%2FAoC2020'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 461e4073551d7bc630b20571bd4020b7600fe004 [INFO] linting playmer/AoC2020 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fplaymer%2FAoC2020" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/playmer/AoC2020 [INFO] finished tweaking git repo https://github.com/playmer/AoC2020 [INFO] tweaked toml for git repo https://github.com/playmer/AoC2020 written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/playmer/AoC2020 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/playmer/AoC2020 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 048a635c39f832076ea1b19bb6c604fa45324113d01cd2d4fd6da8075182e7ba [INFO] running `Command { std: "docker" "start" "-a" "048a635c39f832076ea1b19bb6c604fa45324113d01cd2d4fd6da8075182e7ba", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "048a635c39f832076ea1b19bb6c604fa45324113d01cd2d4fd6da8075182e7ba", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "048a635c39f832076ea1b19bb6c604fa45324113d01cd2d4fd6da8075182e7ba", kill_on_drop: false }` [INFO] [stdout] 048a635c39f832076ea1b19bb6c604fa45324113d01cd2d4fd6da8075182e7ba [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] b914da9509fb1cd9e1a66c397d4a0a2724add9810aefe6221dd403bb65a69bb5 [INFO] running `Command { std: "docker" "start" "-a" "b914da9509fb1cd9e1a66c397d4a0a2724add9810aefe6221dd403bb65a69bb5", kill_on_drop: false }` [INFO] [stderr] Checking untitled v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: almost complete ascii range [INFO] [stdout] --> src/main.rs:341:28 [INFO] [stdout] | [INFO] [stdout] 341 | let number_range = '0'..'9'; [INFO] [stdout] | ^^^--^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use an inclusive range: `..=` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#almost_complete_range [INFO] [stdout] = note: `#[warn(clippy::almost_complete_range)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `cid` is never read [INFO] [stdout] --> src/main.rs:201:5 [INFO] [stdout] | [INFO] [stdout] 192 | struct Passport [INFO] [stdout] | -------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 201 | cid : String, //(Country ID) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:67:33 [INFO] [stdout] | [INFO] [stdout] 67 | fn string_to_password(password: &String) -> Password { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 67 - fn string_to_password(password: &String) -> Password { [INFO] [stdout] 67 + fn string_to_password(password: &str) -> Password { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/main.rs:68:47 [INFO] [stdout] | [INFO] [stdout] 68 | let mut parts: Vec<&str> = password.split(|c| c == ' ' || c == ':' || c == '-').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: almost complete ascii range [INFO] [stdout] --> src/main.rs:341:28 [INFO] [stdout] | [INFO] [stdout] 341 | let number_range = '0'..'9'; [INFO] [stdout] | ^^^--^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use an inclusive range: `..=` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#almost_complete_range [INFO] [stdout] = note: `#[warn(clippy::almost_complete_range)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:149:27 [INFO] [stdout] | [INFO] [stdout] 149 | fn map_from_lines(lines : &Vec) -> Map [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 149 - fn map_from_lines(lines : &Vec) -> Map [INFO] [stdout] 149 + fn map_from_lines(lines : &[String]) -> Map [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/main.rs:230:74 [INFO] [stdout] | [INFO] [stdout] 230 | ...rt_data.split(|c| c == ' ' || c == '\n' || c == '\r').collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `[' ', '\n', '\r']` [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:347:9 [INFO] [stdout] | [INFO] [stdout] 347 | valid && true [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `valid` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:287:11 [INFO] [stdout] | [INFO] [stdout] 287 | byr : &String, //(Birth Year) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 287 ~ byr : &str, //(Birth Year) [INFO] [stdout] 288 | iyr : &String, //(Issue Year) [INFO] [stdout] ... [INFO] [stdout] 299 | valid = valid && (byr.len() == 4); [INFO] [stdout] 300 ~ let birth_year = i32::from_str(byr).unwrap_or(0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:288:11 [INFO] [stdout] | [INFO] [stdout] 288 | iyr : &String, //(Issue Year) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 288 ~ iyr : &str, //(Issue Year) [INFO] [stdout] 289 | eyr : &String, //(Expiration Year) [INFO] [stdout] ... [INFO] [stdout] 304 | valid = valid && (iyr.len() == 4); [INFO] [stdout] 305 ~ let issue_year = i32::from_str(iyr).unwrap_or(0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:289:11 [INFO] [stdout] | [INFO] [stdout] 289 | eyr : &String, //(Expiration Year) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 289 ~ eyr : &str, //(Expiration Year) [INFO] [stdout] 290 | hgt : &String, //(Height) [INFO] [stdout] ... [INFO] [stdout] 309 | valid = valid && (eyr.len() == 4); [INFO] [stdout] 310 ~ let expiration_year = i32::from_str(eyr).unwrap_or(0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:290:11 [INFO] [stdout] | [INFO] [stdout] 290 | hgt : &String, //(Height) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 290 - hgt : &String, //(Height) [INFO] [stdout] 290 + hgt : &str, //(Height) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:291:11 [INFO] [stdout] | [INFO] [stdout] 291 | hcl : &String, //(Hair Color) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 291 - hcl : &String, //(Hair Color) [INFO] [stdout] 291 + hcl : &str, //(Hair Color) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:293:11 [INFO] [stdout] | [INFO] [stdout] 293 | pid : &String //(Passport ID) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 293 ~ pid : &str //(Passport ID) [INFO] [stdout] 294 | ) -> bool [INFO] [stdout] ... [INFO] [stdout] 364 | valid = valid && (pid.len() == 9); [INFO] [stdout] 365 ~ let _expiration_year = i64::from_str(pid).unwrap_or(0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:301:22 [INFO] [stdout] | [INFO] [stdout] 301 | valid = valid && (birth_year >= 1920) && (birth_year <= 2002); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1920..=2002).contains(&birth_year)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:306:22 [INFO] [stdout] | [INFO] [stdout] 306 | valid = valid && (issue_year >= 2010) && (issue_year <= 2020); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2010..=2020).contains(&issue_year)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:311:22 [INFO] [stdout] | [INFO] [stdout] 311 | valid = valid && (expiration_year >= 2020) && (expiration_year <= 2030); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2020..=2030).contains(&expiration_year)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:320:26 [INFO] [stdout] | [INFO] [stdout] 320 | valid = valid && ((150 <= num_value) && (num_value <= 193)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(150..=193).contains(&num_value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:329:26 [INFO] [stdout] | [INFO] [stdout] 329 | valid = valid && ((59 <= num_value) && (num_value <= 76)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(59..=76).contains(&num_value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:394:17 [INFO] [stdout] | [INFO] [stdout] 394 | / ... if check_passport_values(&passport.byr, &passport.iyr, &passport.eyr, &passport.hgt, &passport.hcl, &passport.ecl, &passpor... [INFO] [stdout] 395 | | ... quote_valids_unquote += 1 [INFO] [stdout] 396 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 393 ~ PurportedPassport::Passport(passport) [INFO] [stdout] 394 ~ if check_passport_values(&passport.byr, &passport.iyr, &passport.eyr, &passport.hgt, &passport.hcl, &passport.ecl, &passport.pid) => { [INFO] [stdout] 395 | quote_valids_unquote += 1 [INFO] [stdout] 396 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:399:17 [INFO] [stdout] | [INFO] [stdout] 399 | / ... if check_passport_values(&passport.byr, &passport.iyr, &passport.eyr, &passport.hgt, &passport.hcl, &passport.ecl, &passpor... [INFO] [stdout] 400 | | ... quote_valids_unquote += 1 [INFO] [stdout] 401 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 398 ~ PurportedPassport::NorthPoleCredentials(passport) [INFO] [stdout] 399 ~ if check_passport_values(&passport.byr, &passport.iyr, &passport.eyr, &passport.hgt, &passport.hcl, &passport.ecl, &passport.pid) => { [INFO] [stdout] 400 | quote_valids_unquote += 1 [INFO] [stdout] 401 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `cid` is never read [INFO] [stdout] --> src/main.rs:201:5 [INFO] [stdout] | [INFO] [stdout] 192 | struct Passport [INFO] [stdout] | -------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 201 | cid : String, //(Country ID) [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:67:33 [INFO] [stdout] | [INFO] [stdout] 67 | fn string_to_password(password: &String) -> Password { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 67 - fn string_to_password(password: &String) -> Password { [INFO] [stdout] 67 + fn string_to_password(password: &str) -> Password { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/main.rs:68:47 [INFO] [stdout] | [INFO] [stdout] 68 | let mut parts: Vec<&str> = password.split(|c| c == ' ' || c == ':' || c == '-').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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:149:27 [INFO] [stdout] | [INFO] [stdout] 149 | fn map_from_lines(lines : &Vec) -> Map [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 149 - fn map_from_lines(lines : &Vec) -> Map [INFO] [stdout] 149 + fn map_from_lines(lines : &[String]) -> Map [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this manual char comparison can be written more succinctly [INFO] [stdout] --> src/main.rs:230:74 [INFO] [stdout] | [INFO] [stdout] 230 | ...rt_data.split(|c| c == ' ' || c == '\n' || c == '\r').collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an array of `char`: `[' ', '\n', '\r']` [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:347:9 [INFO] [stdout] | [INFO] [stdout] 347 | valid && true [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `valid` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:287:11 [INFO] [stdout] | [INFO] [stdout] 287 | byr : &String, //(Birth Year) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 287 ~ byr : &str, //(Birth Year) [INFO] [stdout] 288 | iyr : &String, //(Issue Year) [INFO] [stdout] ... [INFO] [stdout] 299 | valid = valid && (byr.len() == 4); [INFO] [stdout] 300 ~ let birth_year = i32::from_str(byr).unwrap_or(0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.27s [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:288:11 [INFO] [stdout] | [INFO] [stdout] 288 | iyr : &String, //(Issue Year) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 288 ~ iyr : &str, //(Issue Year) [INFO] [stdout] 289 | eyr : &String, //(Expiration Year) [INFO] [stdout] ... [INFO] [stdout] 304 | valid = valid && (iyr.len() == 4); [INFO] [stdout] 305 ~ let issue_year = i32::from_str(iyr).unwrap_or(0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:289:11 [INFO] [stdout] | [INFO] [stdout] 289 | eyr : &String, //(Expiration Year) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 289 ~ eyr : &str, //(Expiration Year) [INFO] [stdout] 290 | hgt : &String, //(Height) [INFO] [stdout] ... [INFO] [stdout] 309 | valid = valid && (eyr.len() == 4); [INFO] [stdout] 310 ~ let expiration_year = i32::from_str(eyr).unwrap_or(0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:290:11 [INFO] [stdout] | [INFO] [stdout] 290 | hgt : &String, //(Height) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 290 - hgt : &String, //(Height) [INFO] [stdout] 290 + hgt : &str, //(Height) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:291:11 [INFO] [stdout] | [INFO] [stdout] 291 | hcl : &String, //(Hair Color) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 291 - hcl : &String, //(Hair Color) [INFO] [stdout] 291 + hcl : &str, //(Hair Color) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:293:11 [INFO] [stdout] | [INFO] [stdout] 293 | pid : &String //(Passport ID) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 293 ~ pid : &str //(Passport ID) [INFO] [stdout] 294 | ) -> bool [INFO] [stdout] ... [INFO] [stdout] 364 | valid = valid && (pid.len() == 9); [INFO] [stdout] 365 ~ let _expiration_year = i64::from_str(pid).unwrap_or(0); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:301:22 [INFO] [stdout] | [INFO] [stdout] 301 | valid = valid && (birth_year >= 1920) && (birth_year <= 2002); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(1920..=2002).contains(&birth_year)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:306:22 [INFO] [stdout] | [INFO] [stdout] 306 | valid = valid && (issue_year >= 2010) && (issue_year <= 2020); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2010..=2020).contains(&issue_year)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:311:22 [INFO] [stdout] | [INFO] [stdout] 311 | valid = valid && (expiration_year >= 2020) && (expiration_year <= 2030); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(2020..=2030).contains(&expiration_year)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:320:26 [INFO] [stdout] | [INFO] [stdout] 320 | valid = valid && ((150 <= num_value) && (num_value <= 193)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(150..=193).contains(&num_value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:329:26 [INFO] [stdout] | [INFO] [stdout] 329 | valid = valid && ((59 <= num_value) && (num_value <= 76)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(59..=76).contains(&num_value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:394:17 [INFO] [stdout] | [INFO] [stdout] 394 | / ... if check_passport_values(&passport.byr, &passport.iyr, &passport.eyr, &passport.hgt, &passport.hcl, &passport.ecl, &passpor... [INFO] [stdout] 395 | | ... quote_valids_unquote += 1 [INFO] [stdout] 396 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 393 ~ PurportedPassport::Passport(passport) [INFO] [stdout] 394 ~ if check_passport_values(&passport.byr, &passport.iyr, &passport.eyr, &passport.hgt, &passport.hcl, &passport.ecl, &passport.pid) => { [INFO] [stdout] 395 | quote_valids_unquote += 1 [INFO] [stdout] 396 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:399:17 [INFO] [stdout] | [INFO] [stdout] 399 | / ... if check_passport_values(&passport.byr, &passport.iyr, &passport.eyr, &passport.hgt, &passport.hcl, &passport.ecl, &passpor... [INFO] [stdout] 400 | | ... quote_valids_unquote += 1 [INFO] [stdout] 401 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 398 ~ PurportedPassport::NorthPoleCredentials(passport) [INFO] [stdout] 399 ~ if check_passport_values(&passport.byr, &passport.iyr, &passport.eyr, &passport.hgt, &passport.hcl, &passport.ecl, &passport.pid) => { [INFO] [stdout] 400 | quote_valids_unquote += 1 [INFO] [stdout] 401 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "b914da9509fb1cd9e1a66c397d4a0a2724add9810aefe6221dd403bb65a69bb5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b914da9509fb1cd9e1a66c397d4a0a2724add9810aefe6221dd403bb65a69bb5", kill_on_drop: false }` [INFO] [stdout] b914da9509fb1cd9e1a66c397d4a0a2724add9810aefe6221dd403bb65a69bb5