[INFO] cloning repository https://github.com/jwyxym/lflist_request [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/jwyxym/lflist_request" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjwyxym%2Flflist_request", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjwyxym%2Flflist_request'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] cc168de14084a807c048aaf20ff03731daac2bdd [INFO] linting jwyxym/lflist_request against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjwyxym%2Flflist_request" "/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/jwyxym/lflist_request [INFO] finished tweaking git repo https://github.com/jwyxym/lflist_request [INFO] tweaked toml for git repo https://github.com/jwyxym/lflist_request written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/jwyxym/lflist_request 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/jwyxym/lflist_request already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded cc v1.2.28 [INFO] [stderr] Downloaded tokio v1.46.0 [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] e96568135155dbcb02068d1c3209bf2f85631b196317aaf0031bfa4505221b29 [INFO] running `Command { std: "docker" "start" "-a" "e96568135155dbcb02068d1c3209bf2f85631b196317aaf0031bfa4505221b29", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e96568135155dbcb02068d1c3209bf2f85631b196317aaf0031bfa4505221b29", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e96568135155dbcb02068d1c3209bf2f85631b196317aaf0031bfa4505221b29", kill_on_drop: false }` [INFO] [stdout] e96568135155dbcb02068d1c3209bf2f85631b196317aaf0031bfa4505221b29 [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] 328f851479229dcefb5f6786f1eb245c876877bd79d3af30195c1b6a08ac8851 [INFO] running `Command { std: "docker" "start" "-a" "328f851479229dcefb5f6786f1eb245c876877bd79d3af30195c1b6a08ac8851", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.104 [INFO] [stderr] Compiling cc v1.2.28 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Compiling openssl-sys v0.9.109 [INFO] [stderr] Compiling openssl v0.10.73 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling phf_macros v0.11.3 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Checking tokio v1.46.0 [INFO] [stderr] Compiling cssparser-macros v0.6.1 [INFO] [stderr] Checking phf v0.11.3 [INFO] [stderr] Compiling derive_more v0.99.20 [INFO] [stderr] Checking cssparser v0.34.0 [INFO] [stderr] Compiling match_token v0.1.0 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking zerovec v0.11.2 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Checking selectors v0.26.0 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.2 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking string_cache v0.8.9 [INFO] [stderr] Checking serde_json v1.0.140 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking markup5ever v0.14.1 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Checking html5ever v0.29.1 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking tokio-util v0.7.15 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking tower-http v0.6.6 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking h2 v0.4.11 [INFO] [stderr] Checking scraper v0.23.1 [INFO] [stderr] Checking hyper v1.6.0 [INFO] [stderr] Checking hyper-util v0.1.14 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking reqwest v0.12.22 [INFO] [stderr] Checking lflist_request v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use reqwest; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:245:25 [INFO] [stdout] | [INFO] [stdout] 245 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:246:25 [INFO] [stdout] | [INFO] [stdout] 246 | code: code [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `code` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:253:9 [INFO] [stdout] | [INFO] [stdout] 253 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use reqwest; [INFO] [stdout] | ^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:245:25 [INFO] [stdout] | [INFO] [stdout] 245 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:246:25 [INFO] [stdout] | [INFO] [stdout] 246 | code: code [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `code` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/main.rs:253:9 [INFO] [stdout] | [INFO] [stdout] 253 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/main.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | use std::{i8}; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i8::` will resolve to the respective associated constant [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:172:8 [INFO] [stdout] | [INFO] [stdout] 172 | if !std::fs::metadata("lflist.conf").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata("lflist.conf").is_err()` [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: `format!` in `format!` args [INFO] [stdout] --> src/main.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | ...g = format!("https://www.yugioh-card.com/japan/event/limitregulation/index.php?list={}{}", &year, format!("{:0>2}", &month)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:89:28 [INFO] [stdout] | [INFO] [stdout] 89 | lines.push(format!("{}", i.write)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `i.write.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> src/main.rs:102:31 [INFO] [stdout] | [INFO] [stdout] 102 | ...: String = format!("https://www.yugioh-card.com/en/limited/list_{}-{}-{}/", &year, format!("{:0>2}", &month), &date); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `i` is used as a loop counter [INFO] [stdout] --> src/main.rs:111:13 [INFO] [stdout] | [INFO] [stdout] 111 | for table in tables { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using: `for (i, table) in tables.into_iter().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: useless use of `format!` [INFO] [stdout] --> src/main.rs:115:28 [INFO] [stdout] | [INFO] [stdout] 115 | lines.push(format!("{}", _write[i])); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `_write[i].to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `j` is used as a loop counter [INFO] [stdout] --> src/main.rs:123:21 [INFO] [stdout] | [INFO] [stdout] 123 | for td in tds { [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider using: `for (j, td) in tds.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: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:150:13 [INFO] [stdout] | [INFO] [stdout] 150 | / if let Some(captures) = re.captures(&text) { [INFO] [stdout] 151 | | if let Some(date_match) = captures.get(1) { [INFO] [stdout] 152 | | let mut date = date_match.as_str().split('/'); [INFO] [stdout] 153 | | year = date.next().unwrap().to_string(); [INFO] [stdout] ... | [INFO] [stdout] 157 | | } [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] 150 ~ if let Some(captures) = re.captures(&text) [INFO] [stdout] 151 ~ && let Some(date_match) = captures.get(1) { [INFO] [stdout] 152 | let mut date = date_match.as_str().split('/'); [INFO] [stdout] ... [INFO] [stdout] 155 | lines.push(format!("!{}.{} CN", &year, &month).to_string()); [INFO] [stdout] 156 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:171:8 [INFO] [stdout] | [INFO] [stdout] 171 | if lines.len() == 0 { return Ok(()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lines.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 creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:181:77 [INFO] [stdout] | [INFO] [stdout] 181 | ... lines.insert(0, format!("#[{}.{}{}]{}", &year, &month, if ot == "TCG".to_string() { " TCG" } else if ot == "CN".to_string() {... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"TCG"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:181:120 [INFO] [stdout] | [INFO] [stdout] 181 | ... == "TCG".to_string() { " TCG" } else if ot == "CN".to_string() { " CN" } else { "" }, line.replace("#", ""))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `"CN"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:188:71 [INFO] [stdout] | [INFO] [stdout] 188 | ... lines.insert(0, format!("#[{}.{}{}]", &year, &month, if ot == "TCG".to_string() { " TCG" } else if ot == "CN".to_string() { "... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"TCG"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:188:114 [INFO] [stdout] | [INFO] [stdout] 188 | ... == "TCG".to_string() { " TCG" } else if ot == "CN".to_string() { " CN" } else { "" })); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `"CN"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:233:5 [INFO] [stdout] | [INFO] [stdout] 233 | / if let Some(element) = body.select(&Selector::parse(".cardimg").unwrap()).next() { [INFO] [stdout] 234 | | if let Some(element) = element.select(&Selector::parse("a").unwrap()).next() { [INFO] [stdout] 235 | | if let Some(href) = element.value().attr("href") { [INFO] [stdout] 236 | | let mut code: String = href.to_string().split('/').last().unwrap_or("").to_string(); [INFO] [stdout] ... | [INFO] [stdout] 251 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 233 ~ if let Some(element) = body.select(&Selector::parse(".cardimg").unwrap()).next() [INFO] [stdout] 234 ~ && let Some(element) = element.select(&Selector::parse("a").unwrap()).next() { [INFO] [stdout] 235 | if let Some(href) = element.value().attr("href") { [INFO] [stdout] ... [INFO] [stdout] 249 | } [INFO] [stdout] 250 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:234:9 [INFO] [stdout] | [INFO] [stdout] 234 | / if let Some(element) = element.select(&Selector::parse("a").unwrap()).next() { [INFO] [stdout] 235 | | if let Some(href) = element.value().attr("href") { [INFO] [stdout] 236 | | let mut code: String = href.to_string().split('/').last().unwrap_or("").to_string(); [INFO] [stdout] 237 | | if (1..8).contains(&code.len()) { [INFO] [stdout] ... | [INFO] [stdout] 250 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 234 ~ if let Some(element) = element.select(&Selector::parse("a").unwrap()).next() [INFO] [stdout] 235 ~ && let Some(href) = element.value().attr("href") { [INFO] [stdout] 236 | let mut code: String = href.to_string().split('/').last().unwrap_or("").to_string(); [INFO] [stdout] ... [INFO] [stdout] 248 | } [INFO] [stdout] 249 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/main.rs:236:40 [INFO] [stdout] | [INFO] [stdout] 236 | let mut code: String = href.to_string().split('/').last().unwrap_or("").to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 236 - let mut code: String = href.to_string().split('/').last().unwrap_or("").to_string(); [INFO] [stdout] 236 + let mut code: String = href.to_string().split('/').next_back().unwrap_or("").to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/main.rs:236:40 [INFO] [stdout] | [INFO] [stdout] 236 | let mut code: String = href.to_string().split('/').last().unwrap_or("").to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `href.split('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `scraper::element_ref::Select<'_, '_>` [INFO] [stdout] --> src/main.rs:242:37 [INFO] [stdout] | [INFO] [stdout] 242 | let mut names = element.select(&seletor).into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `element.select(&seletor)` [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: importing legacy numeric constants [INFO] [stdout] --> src/main.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | use std::{i8}; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i8::` will resolve to the respective associated constant [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:172:8 [INFO] [stdout] | [INFO] [stdout] 172 | if !std::fs::metadata("lflist.conf").is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::fs::metadata("lflist.conf").is_err()` [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: `format!` in `format!` args [INFO] [stdout] --> src/main.rs:66:31 [INFO] [stdout] | [INFO] [stdout] 66 | ...g = format!("https://www.yugioh-card.com/japan/event/limitregulation/index.php?list={}{}", &year, format!("{:0>2}", &month)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] = note: `#[warn(clippy::format_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/main.rs:89:28 [INFO] [stdout] | [INFO] [stdout] 89 | lines.push(format!("{}", i.write)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `i.write.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `format!` in `format!` args [INFO] [stdout] --> src/main.rs:102:31 [INFO] [stdout] | [INFO] [stdout] 102 | ...: String = format!("https://www.yugioh-card.com/en/limited/list_{}-{}-{}/", &year, format!("{:0>2}", &month), &date); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: combine the `format!(..)` arguments with the outer `format!(..)` call [INFO] [stdout] = help: or consider changing `format!` to `format_args!` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `i` is used as a loop counter [INFO] [stdout] --> src/main.rs:111:13 [INFO] [stdout] | [INFO] [stdout] 111 | for table in tables { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using: `for (i, table) in tables.into_iter().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: useless use of `format!` [INFO] [stdout] --> src/main.rs:115:28 [INFO] [stdout] | [INFO] [stdout] 115 | lines.push(format!("{}", _write[i])); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `_write[i].to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `j` is used as a loop counter [INFO] [stdout] --> src/main.rs:123:21 [INFO] [stdout] | [INFO] [stdout] 123 | for td in tds { [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider using: `for (j, td) in tds.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: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:150:13 [INFO] [stdout] | [INFO] [stdout] 150 | / if let Some(captures) = re.captures(&text) { [INFO] [stdout] 151 | | if let Some(date_match) = captures.get(1) { [INFO] [stdout] 152 | | let mut date = date_match.as_str().split('/'); [INFO] [stdout] 153 | | year = date.next().unwrap().to_string(); [INFO] [stdout] ... | [INFO] [stdout] 157 | | } [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] 150 ~ if let Some(captures) = re.captures(&text) [INFO] [stdout] 151 ~ && let Some(date_match) = captures.get(1) { [INFO] [stdout] 152 | let mut date = date_match.as_str().split('/'); [INFO] [stdout] ... [INFO] [stdout] 155 | lines.push(format!("!{}.{} CN", &year, &month).to_string()); [INFO] [stdout] 156 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:171:8 [INFO] [stdout] | [INFO] [stdout] 171 | if lines.len() == 0 { return Ok(()); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `lines.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 creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:181:77 [INFO] [stdout] | [INFO] [stdout] 181 | ... lines.insert(0, format!("#[{}.{}{}]{}", &year, &month, if ot == "TCG".to_string() { " TCG" } else if ot == "CN".to_string() {... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"TCG"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:181:120 [INFO] [stdout] | [INFO] [stdout] 181 | ... == "TCG".to_string() { " TCG" } else if ot == "CN".to_string() { " CN" } else { "" }, line.replace("#", ""))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `"CN"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:188:71 [INFO] [stdout] | [INFO] [stdout] 188 | ... lines.insert(0, format!("#[{}.{}{}]", &year, &month, if ot == "TCG".to_string() { " TCG" } else if ot == "CN".to_string() { "... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `"TCG"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/main.rs:188:114 [INFO] [stdout] | [INFO] [stdout] 188 | ... == "TCG".to_string() { " TCG" } else if ot == "CN".to_string() { " CN" } else { "" })); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try: `"CN"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:233:5 [INFO] [stdout] | [INFO] [stdout] 233 | / if let Some(element) = body.select(&Selector::parse(".cardimg").unwrap()).next() { [INFO] [stdout] 234 | | if let Some(element) = element.select(&Selector::parse("a").unwrap()).next() { [INFO] [stdout] 235 | | if let Some(href) = element.value().attr("href") { [INFO] [stdout] 236 | | let mut code: String = href.to_string().split('/').last().unwrap_or("").to_string(); [INFO] [stdout] ... | [INFO] [stdout] 251 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 233 ~ if let Some(element) = body.select(&Selector::parse(".cardimg").unwrap()).next() [INFO] [stdout] 234 ~ && let Some(element) = element.select(&Selector::parse("a").unwrap()).next() { [INFO] [stdout] 235 | if let Some(href) = element.value().attr("href") { [INFO] [stdout] ... [INFO] [stdout] 249 | } [INFO] [stdout] 250 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/main.rs:234:9 [INFO] [stdout] | [INFO] [stdout] 234 | / if let Some(element) = element.select(&Selector::parse("a").unwrap()).next() { [INFO] [stdout] 235 | | if let Some(href) = element.value().attr("href") { [INFO] [stdout] 236 | | let mut code: String = href.to_string().split('/').last().unwrap_or("").to_string(); [INFO] [stdout] 237 | | if (1..8).contains(&code.len()) { [INFO] [stdout] ... | [INFO] [stdout] 250 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 234 ~ if let Some(element) = element.select(&Selector::parse("a").unwrap()).next() [INFO] [stdout] 235 ~ && let Some(href) = element.value().attr("href") { [INFO] [stdout] 236 | let mut code: String = href.to_string().split('/').last().unwrap_or("").to_string(); [INFO] [stdout] ... [INFO] [stdout] 248 | } [INFO] [stdout] 249 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator [INFO] [stdout] --> src/main.rs:236:40 [INFO] [stdout] | [INFO] [stdout] 236 | let mut code: String = href.to_string().split('/').last().unwrap_or("").to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [INFO] [stdout] = note: `#[warn(clippy::double_ended_iterator_last)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 236 - let mut code: String = href.to_string().split('/').last().unwrap_or("").to_string(); [INFO] [stdout] 236 + let mut code: String = href.to_string().split('/').next_back().unwrap_or("").to_string(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/main.rs:236:40 [INFO] [stdout] | [INFO] [stdout] 236 | let mut code: String = href.to_string().split('/').last().unwrap_or("").to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `href.split('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `scraper::element_ref::Select<'_, '_>` [INFO] [stdout] --> src/main.rs:242:37 [INFO] [stdout] | [INFO] [stdout] 242 | let mut names = element.select(&seletor).into_iter(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `element.select(&seletor)` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 50.11s [INFO] running `Command { std: "docker" "inspect" "328f851479229dcefb5f6786f1eb245c876877bd79d3af30195c1b6a08ac8851", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "328f851479229dcefb5f6786f1eb245c876877bd79d3af30195c1b6a08ac8851", kill_on_drop: false }` [INFO] [stdout] 328f851479229dcefb5f6786f1eb245c876877bd79d3af30195c1b6a08ac8851