[INFO] fetching crate text_manipulation_rs 0.1.3... [INFO] linting text_manipulation_rs-0.1.3 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate text_manipulation_rs 0.1.3 into /workspace/builds/worker-7-tc1/source [INFO] started tweaking crates.io crate text_manipulation_rs 0.1.3 [INFO] finished tweaking crates.io crate text_manipulation_rs 0.1.3 [INFO] tweaked toml for crates.io crate text_manipulation_rs 0.1.3 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate text_manipulation_rs 0.1.3 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] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 199 packages to latest compatible versions [INFO] [stderr] Adding cargo-fuzz v0.11.4 (available: v0.13.1) [INFO] [stderr] Adding rand v0.8.5 (available: v0.10.0) [INFO] [stderr] Adding reqwest v0.11.27 (available: v0.13.2) [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 colorchoice v1.0.5 [INFO] [stderr] Downloaded current_platform v0.2.0 [INFO] [stderr] Downloaded anstyle-parse v1.0.0 [INFO] [stderr] Downloaded clap_derive v4.6.0 [INFO] [stderr] Downloaded cargo-fuzz v0.11.4 [INFO] [stderr] Downloaded anstream v1.0.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] dced7f34808933f9519062b70b37287856ccc8545cc65ffc7f390b1d60e3b703 [INFO] running `Command { std: "docker" "start" "-a" "dced7f34808933f9519062b70b37287856ccc8545cc65ffc7f390b1d60e3b703", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "dced7f34808933f9519062b70b37287856ccc8545cc65ffc7f390b1d60e3b703", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dced7f34808933f9519062b70b37287856ccc8545cc65ffc7f390b1d60e3b703", kill_on_drop: false }` [INFO] [stdout] dced7f34808933f9519062b70b37287856ccc8545cc65ffc7f390b1d60e3b703 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 33018316b3343a415b99087fea0b8c4fd4a4e7771bfb2029485f66d777502d80 [INFO] running `Command { std: "docker" "start" "-a" "33018316b3343a415b99087fea0b8c4fd4a4e7771bfb2029485f66d777502d80", kill_on_drop: false }` [INFO] [stderr] warning: text_manipulation_rs v0.1.3 (/opt/rustwide/workdir) ignoring invalid dependency `cargo-fuzz` which is missing a lib target [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Checking pin-project-lite v0.2.17 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Compiling openssl v0.10.76 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Compiling openssl-sys v0.9.112 [INFO] [stderr] Checking socket2 v0.6.3 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Compiling libz-sys v1.1.25 [INFO] [stderr] Compiling zerocopy v0.8.42 [INFO] [stderr] Compiling native-tls v0.2.18 [INFO] [stderr] Compiling curl-sys v0.4.86+curl-8.19.0 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Checking getrandom v0.2.17 [INFO] [stderr] Checking futures-channel v0.3.32 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Checking futures-util v0.3.32 [INFO] [stderr] Checking http-body v0.4.6 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Compiling curl v0.4.49 [INFO] [stderr] Checking rustls-pemfile v1.0.4 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Checking ipnet v2.12.0 [INFO] [stderr] Checking sync_wrapper v0.1.2 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Checking tokio v1.50.0 [INFO] [stderr] Checking tokio-util v0.7.18 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Checking h2 v0.3.27 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking hyper v0.14.32 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Checking hyper-tls v0.5.0 [INFO] [stderr] Checking reqwest v0.11.27 [INFO] [stderr] Checking text_manipulation_rs v0.1.3 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/request/translation_request.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | text: text, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `text` [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/request/translation_request.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | target_lang: target_lang, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `target_lang` [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/request/glossary_request.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | endpoint: endpoint, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `endpoint` [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/request/glossary_request.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | endpoint: endpoint, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `endpoint` [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/request/translation_request.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | text: text, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `text` [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/request/translation_request.rs:42:13 [INFO] [stdout] | [INFO] [stdout] 42 | target_lang: target_lang, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `target_lang` [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/request/glossary_request.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | endpoint: endpoint, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `endpoint` [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/request/glossary_request.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | endpoint: endpoint, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `endpoint` [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: struct `Definition` is never constructed [INFO] [stdout] --> src/dictionary/mod.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | struct Definition { [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/deepl/mod.rs:521:47 [INFO] [stdout] | [INFO] [stdout] 521 | source_lang: SourceLang::from_str(&upper_source.as_str()).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `upper_source.as_str()` [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/deepl/mod.rs:522:47 [INFO] [stdout] | [INFO] [stdout] 522 | target_lang: TargetLang::from_str(&upper_target.as_str()).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `upper_target.as_str()` [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: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/deepl/mod.rs:534:16 [INFO] [stdout] | [INFO] [stdout] 534 | if let Ok(_) = res { [INFO] [stdout] | -------^^^^^------ help: try: `if res.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` 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/request/http_request.rs:117:18 [INFO] [stdout] | [INFO] [stdout] 117 | easy.url(&self.endpoint).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.endpoint` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/request/http_request.rs:121:12 [INFO] [stdout] | [INFO] [stdout] 121 | if &self.endpoint.len() == &0usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 121 - if &self.endpoint.len() == &0usize { [INFO] [stdout] 121 + if self.endpoint.len() == 0usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/request/http_request.rs:158:27 [INFO] [stdout] | [INFO] [stdout] 158 | for head in h.into_iter() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/request/http_request.rs:170:16 [INFO] [stdout] | [INFO] [stdout] 170 | if vec_bytes.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_bytes.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: unnecessary use of `to_owned` [INFO] [stdout] --> src/request/glossary_request.rs:73:34 [INFO] [stdout] | [INFO] [stdout] 73 | for entry in arr.to_owned() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use: `arr.iter().cloned()` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/request/glossary_request.rs:154:5 [INFO] [stdout] | [INFO] [stdout] 154 | / let mut params : Vec = Vec::new(); [INFO] [stdout] 155 | | params.push(String::from("Accept: text/tab-separated-values")); [INFO] [stdout] | |___________________________________________________________________^ help: consider using the `vec![]` macro: `let params: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `response [INFO] [stdout] .as_array() [INFO] [stdout] .ok_or("Unexpected response format: expected JSON array; no entry found")?.get(0)` [INFO] [stdout] --> src/dictionary/mod.rs:26:23 [INFO] [stdout] | [INFO] [stdout] 26 | let first_entry = response [INFO] [stdout] | _______________________^ [INFO] [stdout] 27 | | .as_array() [INFO] [stdout] 28 | | .ok_or("Unexpected response format: expected JSON array; no entry found")? [INFO] [stdout] 29 | | .get(0) [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 26 ~ let first_entry = response [INFO] [stdout] 27 + .as_array() [INFO] [stdout] 28 + .ok_or("Unexpected response format: expected JSON array; no entry found")?.first() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/text_generator/mod.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | if write_to_file == true{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `write_to_file` [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: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/request/http_request.rs:135:48 [INFO] [stdout] | [INFO] [stdout] 135 | let bytes = body.as_bytes().clone(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `[u8]` does not implement `Clone`, so calling `clone` on `&[u8]` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> src/request/translation_request.rs:38:59 [INFO] [stdout] | [INFO] [stdout] 38 | pub fn new(text: &'a str, target_lang: TargetLang) -> TranslationRequest { [INFO] [stdout] | -- the lifetime is named here ^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 38 | pub fn new(text: &'a str, target_lang: TargetLang) -> TranslationRequest<'a> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/request/translation_request.rs:56:27 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn create_request(&self, auth : &'a DeepLKey) -> HttpRequest { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 56 | pub fn create_request(&self, auth : &'a DeepLKey) -> HttpRequest<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Definition` is never constructed [INFO] [stdout] --> src/dictionary/mod.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | struct Definition { [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/deepl/mod.rs:521:47 [INFO] [stdout] | [INFO] [stdout] 521 | source_lang: SourceLang::from_str(&upper_source.as_str()).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `upper_source.as_str()` [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/deepl/mod.rs:522:47 [INFO] [stdout] | [INFO] [stdout] 522 | target_lang: TargetLang::from_str(&upper_target.as_str()).unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `upper_target.as_str()` [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: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/deepl/mod.rs:534:16 [INFO] [stdout] | [INFO] [stdout] 534 | if let Ok(_) = res { [INFO] [stdout] | -------^^^^^------ help: try: `if res.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` 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/request/http_request.rs:117:18 [INFO] [stdout] | [INFO] [stdout] 117 | easy.url(&self.endpoint).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `self.endpoint` [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: needlessly taken reference of both operands [INFO] [stdout] --> src/request/http_request.rs:121:12 [INFO] [stdout] | [INFO] [stdout] 121 | if &self.endpoint.len() == &0usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] help: use the values directly [INFO] [stdout] | [INFO] [stdout] 121 - if &self.endpoint.len() == &0usize { [INFO] [stdout] 121 + if self.endpoint.len() == 0usize { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/request/http_request.rs:158:27 [INFO] [stdout] | [INFO] [stdout] 158 | for head in h.into_iter() { [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/request/http_request.rs:170:16 [INFO] [stdout] | [INFO] [stdout] 170 | if vec_bytes.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!vec_bytes.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: unnecessary use of `to_owned` [INFO] [stdout] --> src/request/glossary_request.rs:73:34 [INFO] [stdout] | [INFO] [stdout] 73 | for entry in arr.to_owned() { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use: `arr.iter().cloned()` [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: calls to `push` immediately after creation [INFO] [stdout] --> src/request/glossary_request.rs:154:5 [INFO] [stdout] | [INFO] [stdout] 154 | / let mut params : Vec = Vec::new(); [INFO] [stdout] 155 | | params.push(String::from("Accept: text/tab-separated-values")); [INFO] [stdout] | |___________________________________________________________________^ help: consider using the `vec![]` macro: `let params: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `response [INFO] [stdout] .as_array() [INFO] [stdout] .ok_or("Unexpected response format: expected JSON array; no entry found")?.get(0)` [INFO] [stdout] --> src/dictionary/mod.rs:26:23 [INFO] [stdout] | [INFO] [stdout] 26 | let first_entry = response [INFO] [stdout] | _______________________^ [INFO] [stdout] 27 | | .as_array() [INFO] [stdout] 28 | | .ok_or("Unexpected response format: expected JSON array; no entry found")? [INFO] [stdout] 29 | | .get(0) [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 26 ~ let first_entry = response [INFO] [stdout] 27 + .as_array() [INFO] [stdout] 28 + .ok_or("Unexpected response format: expected JSON array; no entry found")?.first() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: equality checks against true are unnecessary [INFO] [stdout] --> src/text_generator/mod.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | if write_to_file == true{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `write_to_file` [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: needless call to `as_bytes` [INFO] [stdout] --> src/lib.rs:39:21 [INFO] [stdout] | [INFO] [stdout] 39 | assert!(result.as_bytes().len() <= max_bytes.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `result.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `unwrap()` on `Some` value [INFO] [stdout] --> src/lib.rs:39:48 [INFO] [stdout] | [INFO] [stdout] 39 | assert!(result.as_bytes().len() <= max_bytes.unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: remove the `Some` and `unwrap()` [INFO] [stdout] --> src/lib.rs:37:29 [INFO] [stdout] | [INFO] [stdout] 37 | let max_bytes = Some(10); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_literal_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_literal_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:105:21 [INFO] [stdout] | [INFO] [stdout] 105 | assert!(!res.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `res.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:137:25 [INFO] [stdout] | [INFO] [stdout] 137 | assert!(!res2.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `res2.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/lib.rs:129:17 [INFO] [stdout] | [INFO] [stdout] 129 | return; [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] 128 - if g.len() == 0 { [INFO] [stdout] 129 - return; [INFO] [stdout] 128 + if g.len() == 0 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:128:16 [INFO] [stdout] | [INFO] [stdout] 128 | if g.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `g.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] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `g.get(0)` [INFO] [stdout] --> src/lib.rs:131:32 [INFO] [stdout] | [INFO] [stdout] 131 | let glossary = g.get(0).unwrap(); [INFO] [stdout] | ^^^^^^^^ help: try: `g.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/lib.rs:152:43 [INFO] [stdout] | [INFO] [stdout] 152 | assert_eq!(ApiError::from_u32(std::u32::MAX), ApiError::Http500Plus); [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] 152 - assert_eq!(ApiError::from_u32(std::u32::MAX), ApiError::Http500Plus); [INFO] [stdout] 152 + assert_eq!(ApiError::from_u32(u32::MAX), ApiError::Http500Plus); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/lib.rs:230:13 [INFO] [stdout] | [INFO] [stdout] 230 | / let mut headers : Vec = Vec::new(); [INFO] [stdout] 231 | | headers.push(String::from("Garbage: Foo")); [INFO] [stdout] | |_______________________________________________________^ help: consider using the `vec![]` macro: `let headers: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:288:21 [INFO] [stdout] | [INFO] [stdout] 288 | assert!(!res.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `res.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:303:21 [INFO] [stdout] | [INFO] [stdout] 303 | assert!(!res.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `res.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `trans.get(0)` [INFO] [stdout] --> src/lib.rs:293:32 [INFO] [stdout] | [INFO] [stdout] 293 | assert_eq!(trans.get(0).unwrap()["text"].as_str().unwrap(), "Hallo, Welt!"); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `trans.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `trans.get(0)` [INFO] [stdout] --> src/lib.rs:308:32 [INFO] [stdout] | [INFO] [stdout] 308 | assert_eq!(trans.get(0).unwrap()["text"].as_str().unwrap(), ""); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `trans.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:320:21 [INFO] [stdout] | [INFO] [stdout] 320 | assert!(!res.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `res.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:324:21 [INFO] [stdout] | [INFO] [stdout] 324 | assert!(!g.is_err()); [INFO] [stdout] | ^^^^^^^^^^^ help: try: `g.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:349:21 [INFO] [stdout] | [INFO] [stdout] 349 | assert!(!get_glossaries(&auth).is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `get_glossaries(&auth).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:363:21 [INFO] [stdout] | [INFO] [stdout] 363 | assert!(!res.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `res.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:394:21 [INFO] [stdout] | [INFO] [stdout] 394 | assert!(!res.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `res.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:396:21 [INFO] [stdout] | [INFO] [stdout] 396 | assert!(!entries.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `entries.is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/request/http_request.rs:135:48 [INFO] [stdout] | [INFO] [stdout] 135 | let bytes = body.as_bytes().clone(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `[u8]` does not implement `Clone`, so calling `clone` on `&[u8]` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> src/request/translation_request.rs:38:59 [INFO] [stdout] | [INFO] [stdout] 38 | pub fn new(text: &'a str, target_lang: TargetLang) -> TranslationRequest { [INFO] [stdout] | -- the lifetime is named here ^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 38 | pub fn new(text: &'a str, target_lang: TargetLang) -> TranslationRequest<'a> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/request/translation_request.rs:56:27 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn create_request(&self, auth : &'a DeepLKey) -> HttpRequest { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 56 | pub fn create_request(&self, auth : &'a DeepLKey) -> HttpRequest<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 22.70s [INFO] running `Command { std: "docker" "inspect" "33018316b3343a415b99087fea0b8c4fd4a4e7771bfb2029485f66d777502d80", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "33018316b3343a415b99087fea0b8c4fd4a4e7771bfb2029485f66d777502d80", kill_on_drop: false }` [INFO] [stdout] 33018316b3343a415b99087fea0b8c4fd4a4e7771bfb2029485f66d777502d80