[INFO] cloning repository https://github.com/0verwritten/explainer [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/0verwritten/explainer" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F0verwritten%2Fexplainer", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F0verwritten%2Fexplainer'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9b68b8517484f23a3f9cecc2428fd3d9428dc613 [INFO] linting 0verwritten/explainer against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2F0verwritten%2Fexplainer" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/0verwritten/explainer [INFO] finished tweaking git repo https://github.com/0verwritten/explainer [INFO] tweaked toml for git repo https://github.com/0verwritten/explainer written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/0verwritten/explainer 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/0verwritten/explainer 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 redox_syscall v0.2.9 [INFO] [stderr] Downloaded pin-project-lite v0.2.7 [INFO] [stderr] Downloaded tokio-macros v1.3.0 [INFO] [stderr] Downloaded instant v0.1.10 [INFO] [stderr] Downloaded rand_hc v0.3.1 [INFO] [stderr] Downloaded once_cell v1.8.0 [INFO] [stderr] Downloaded proc-macro2 v1.0.28 [INFO] [stderr] Downloaded futures-core v0.3.16 [INFO] [stderr] Downloaded tower-service v0.3.1 [INFO] [stderr] Downloaded openssl-probe v0.1.4 [INFO] [stderr] Downloaded slab v0.4.4 [INFO] [stderr] Downloaded httpdate v1.0.1 [INFO] [stderr] Downloaded serde_urlencoded v0.7.0 [INFO] [stderr] Downloaded http-body v0.4.3 [INFO] [stderr] Downloaded futures-macro v0.3.16 [INFO] [stderr] Downloaded httparse v1.4.1 [INFO] [stderr] Downloaded ipnet v2.3.1 [INFO] [stderr] Downloaded futures-sink v0.3.16 [INFO] [stderr] Downloaded colored v2.0.0 [INFO] [stderr] Downloaded futures-channel v0.3.16 [INFO] [stderr] Downloaded tokio-util v0.6.7 [INFO] [stderr] Downloaded tracing v0.1.26 [INFO] [stderr] Downloaded unicode-normalization v0.1.19 [INFO] [stderr] Downloaded http v0.2.4 [INFO] [stderr] Downloaded reqwest v0.11.4 [INFO] [stderr] Downloaded futures-util v0.3.16 [INFO] [stderr] Downloaded h2 v0.3.3 [INFO] [stderr] Downloaded openssl v0.10.35 [INFO] [stderr] Downloaded syn v1.0.74 [INFO] [stderr] Downloaded hyper v0.14.11 [INFO] [stderr] Downloaded wasm-bindgen v0.2.75 [INFO] [stderr] Downloaded bumpalo v3.7.0 [INFO] [stderr] Downloaded serde_json v1.0.66 [INFO] [stderr] Downloaded serde v1.0.127 [INFO] [stderr] Downloaded mio v0.7.13 [INFO] [stderr] Downloaded rand v0.8.4 [INFO] [stderr] Downloaded cc v1.0.69 [INFO] [stderr] Downloaded openssl-sys v0.9.65 [INFO] [stderr] Downloaded security-framework v2.3.1 [INFO] [stderr] Downloaded js-sys v0.3.52 [INFO] [stderr] Downloaded serde_derive v1.0.127 [INFO] [stderr] Downloaded tokio v1.9.0 [INFO] [stderr] Downloaded indexmap v1.7.0 [INFO] [stderr] Downloaded unicode-bidi v0.3.5 [INFO] [stderr] Downloaded libc v0.2.99 [INFO] [stderr] Downloaded socket2 v0.4.1 [INFO] [stderr] Downloaded tracing-core v0.1.18 [INFO] [stderr] Downloaded rand_core v0.6.3 [INFO] [stderr] Downloaded tinyvec v1.3.1 [INFO] [stderr] Downloaded getrandom v0.2.3 [INFO] [stderr] Downloaded wasm-bindgen-backend v0.2.75 [INFO] [stderr] Downloaded wasm-bindgen-macro-support v0.2.75 [INFO] [stderr] Downloaded native-tls v0.2.8 [INFO] [stderr] Downloaded mime_guess v2.0.3 [INFO] [stderr] Downloaded futures-task v0.3.16 [INFO] [stderr] Downloaded web-sys v0.3.52 [INFO] [stderr] Downloaded security-framework-sys v2.3.0 [INFO] [stderr] Downloaded wasm-bindgen-futures v0.4.25 [INFO] [stderr] Downloaded wasm-bindgen-shared v0.2.75 [INFO] [stderr] Downloaded wasm-bindgen-macro v0.2.75 [INFO] [stderr] Downloaded encoding_rs v0.8.28 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 8cb3dd49ed3e52c27eb0868b3818c00689042ba19b6bf1499a1d5104fe83c607 [INFO] running `Command { std: "docker" "start" "-a" "8cb3dd49ed3e52c27eb0868b3818c00689042ba19b6bf1499a1d5104fe83c607", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8cb3dd49ed3e52c27eb0868b3818c00689042ba19b6bf1499a1d5104fe83c607", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8cb3dd49ed3e52c27eb0868b3818c00689042ba19b6bf1499a1d5104fe83c607", kill_on_drop: false }` [INFO] [stdout] 8cb3dd49ed3e52c27eb0868b3818c00689042ba19b6bf1499a1d5104fe83c607 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] ff2fe3d8f13df69ff6e0342a3dc49fceb1fa02e6f3f3322494e1c937db69ed62 [INFO] running `Command { std: "docker" "start" "-a" "ff2fe3d8f13df69ff6e0342a3dc49fceb1fa02e6f3f3322494e1c937db69ed62", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.99 [INFO] [stderr] Compiling proc-macro2 v1.0.28 [INFO] [stderr] Compiling syn v1.0.74 [INFO] [stderr] Compiling pkg-config v0.3.19 [INFO] [stderr] Compiling cc v1.0.69 [INFO] [stderr] Checking pin-project-lite v0.2.7 [INFO] [stderr] Checking instant v0.1.10 [INFO] [stderr] Checking once_cell v1.8.0 [INFO] [stderr] Checking bytes v1.0.1 [INFO] [stderr] Compiling futures-core v0.3.16 [INFO] [stderr] Compiling tokio v1.9.0 [INFO] [stderr] Compiling version_check v0.9.3 [INFO] [stderr] Checking itoa v0.4.7 [INFO] [stderr] Compiling futures-macro v0.3.16 [INFO] [stderr] Compiling futures-task v0.3.16 [INFO] [stderr] Compiling indexmap v1.7.0 [INFO] [stderr] Compiling unicase v2.6.0 [INFO] [stderr] Checking parking_lot_core v0.8.3 [INFO] [stderr] Compiling quote v1.0.9 [INFO] [stderr] Checking signal-hook-registry v1.4.0 [INFO] [stderr] Checking mio v0.7.13 [INFO] [stderr] Checking num_cpus v1.13.0 [INFO] [stderr] Checking parking_lot v0.11.1 [INFO] [stderr] Compiling futures-util v0.3.16 [INFO] [stderr] Checking fnv v1.0.7 [INFO] [stderr] Compiling serde_derive v1.0.127 [INFO] [stderr] Compiling openssl v0.10.35 [INFO] [stderr] Checking foreign-types-shared v0.1.1 [INFO] [stderr] Checking foreign-types v0.3.2 [INFO] [stderr] Checking http v0.2.4 [INFO] [stderr] Checking tracing-core v0.1.18 [INFO] [stderr] Checking futures-sink v0.3.16 [INFO] [stderr] Checking slab v0.4.4 [INFO] [stderr] Compiling ryu v1.0.5 [INFO] [stderr] Compiling futures-channel v0.3.16 [INFO] [stderr] Compiling native-tls v0.2.8 [INFO] [stderr] Compiling serde v1.0.127 [INFO] [stderr] Checking tinyvec_macros v0.1.0 [INFO] [stderr] Checking hashbrown v0.11.2 [INFO] [stderr] Compiling httparse v1.4.1 [INFO] [stderr] Checking tracing v0.1.26 [INFO] [stderr] Checking tinyvec v1.3.1 [INFO] [stderr] Compiling openssl-sys v0.9.65 [INFO] [stderr] Checking try-lock v0.2.3 [INFO] [stderr] Checking percent-encoding v2.1.0 [INFO] [stderr] Checking openssl-probe v0.1.4 [INFO] [stderr] Checking form_urlencoded v1.0.1 [INFO] [stderr] Compiling mime_guess v2.0.3 [INFO] [stderr] Checking want v0.3.0 [INFO] [stderr] Checking unicode-bidi v0.3.5 [INFO] [stderr] Checking getrandom v0.2.3 [INFO] [stderr] Checking socket2 v0.4.1 [INFO] [stderr] Compiling serde_json v1.0.66 [INFO] [stderr] Checking httpdate v1.0.1 [INFO] [stderr] Checking tower-service v0.3.1 [INFO] [stderr] Compiling encoding_rs v0.8.28 [INFO] [stderr] Checking rand_core v0.6.3 [INFO] [stderr] Checking ppv-lite86 v0.2.10 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking ipnet v2.3.1 [INFO] [stderr] Checking unicode-normalization v0.1.19 [INFO] [stderr] Checking http-body v0.4.3 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking base64 v0.13.0 [INFO] [stderr] Checking colored v2.0.0 [INFO] [stderr] Checking rand v0.8.4 [INFO] [stderr] Checking idna v0.2.3 [INFO] [stderr] Checking url v2.2.2 [INFO] [stderr] Compiling tokio-macros v1.3.0 [INFO] [stderr] Checking tokio-util v0.6.7 [INFO] [stderr] Checking tokio-native-tls v0.3.0 [INFO] [stderr] Checking h2 v0.3.3 [INFO] [stderr] Checking hyper v0.14.11 [INFO] [stderr] Checking serde_urlencoded v0.7.0 [INFO] [stderr] Checking hyper-tls v0.5.0 [INFO] [stderr] Checking reqwest v0.11.4 [INFO] [stderr] Checking explainer v1.0.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: fields `offensive` and `headword` are never read [INFO] [stdout] --> src/lib.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct WordFinder{ [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 24 | word: String, [INFO] [stdout] 25 | offensive: bool, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 26 | headword: String, // pronunciation [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:49:24 [INFO] [stdout] | [INFO] [stdout] 49 | Ok(val) if val.len() > 0 => Ok( WordFinder::from_wordresponce( val.into_iter().nth(0).unwrap() )), [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!val.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: manual implementation of `Option::map` [INFO] [stdout] --> src/lib.rs:60:28 [INFO] [stdout] | [INFO] [stdout] 60 | pronunciation: match wordresponce.hwi.prs.as_ref(){ [INFO] [stdout] | ____________________________^ [INFO] [stdout] 61 | | Some(val) => Some(val[0].mw.as_ref().unwrap_or(&String::new()).to_string()), [INFO] [stdout] 62 | | None => None [INFO] [stdout] 63 | | }, [INFO] [stdout] | |_____________^ help: try: `wordresponce.hwi.prs.as_ref().map(|val| val[0].mw.as_ref().unwrap_or(&String::new()).to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/lib.rs:65:37 [INFO] [stdout] | [INFO] [stdout] 65 | Some(val) => match &val.iter().filter( |x| !x.sound.is_none() ).next().unwrap().sound{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `val.iter().find(|x| !x.sound.is_none())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:65:60 [INFO] [stdout] | [INFO] [stdout] 65 | Some(val) => match &val.iter().filter( |x| !x.sound.is_none() ).next().unwrap().sound{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `x.sound.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | match self.audio_link.as_ref() { Some(val) => Some(val.to_string()), None => None } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.audio_link.as_ref().map(|val| val.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/lib.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | writeln!(f, "word: {}", self.get_word()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 102 | let _ = writeln!(f, "word: {}", self.get_word()); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/lib.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 104 | writeln!(f, "pronunciation: {}", pronoun); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 104 | let _ = writeln!(f, "pronunciation: {}", pronoun); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/lib.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | writeln!(f, "definitions:\n\t- {}", self.definition.join("\n\t- ")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 106 | let _ = writeln!(f, "definitions:\n\t- {}", self.definition.join("\n\t- ")); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `offensive` and `headword` are never read [INFO] [stdout] --> src/lib.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct WordFinder{ [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 24 | word: String, [INFO] [stdout] 25 | offensive: bool, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] 26 | headword: String, // pronunciation [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/lib.rs:49:24 [INFO] [stdout] | [INFO] [stdout] 49 | Ok(val) if val.len() > 0 => Ok( WordFinder::from_wordresponce( val.into_iter().nth(0).unwrap() )), [INFO] [stdout] | ^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!val.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: manual implementation of `Option::map` [INFO] [stdout] --> src/lib.rs:60:28 [INFO] [stdout] | [INFO] [stdout] 60 | pronunciation: match wordresponce.hwi.prs.as_ref(){ [INFO] [stdout] | ____________________________^ [INFO] [stdout] 61 | | Some(val) => Some(val[0].mw.as_ref().unwrap_or(&String::new()).to_string()), [INFO] [stdout] 62 | | None => None [INFO] [stdout] 63 | | }, [INFO] [stdout] | |_____________^ help: try: `wordresponce.hwi.prs.as_ref().map(|val| val[0].mw.as_ref().unwrap_or(&String::new()).to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead [INFO] [stdout] --> src/lib.rs:65:37 [INFO] [stdout] | [INFO] [stdout] 65 | Some(val) => match &val.iter().filter( |x| !x.sound.is_none() ).next().unwrap().sound{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `val.iter().find(|x| !x.sound.is_none())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stdout] = note: `#[warn(clippy::filter_next)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:65:60 [INFO] [stdout] | [INFO] [stdout] 65 | Some(val) => match &val.iter().filter( |x| !x.sound.is_none() ).next().unwrap().sound{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `x.sound.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/lib.rs:93:9 [INFO] [stdout] | [INFO] [stdout] 93 | match self.audio_link.as_ref() { Some(val) => Some(val.to_string()), None => None } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.audio_link.as_ref().map(|val| val.to_string())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/lib.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | writeln!(f, "word: {}", self.get_word()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 102 | let _ = writeln!(f, "word: {}", self.get_word()); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/lib.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 104 | writeln!(f, "pronunciation: {}", pronoun); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 104 | let _ = writeln!(f, "pronunciation: {}", pronoun); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/lib.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | writeln!(f, "definitions:\n\t- {}", self.definition.join("\n\t- ")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 106 | let _ = writeln!(f, "definitions:\n\t- {}", self.definition.join("\n\t- ")); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/botlib/mod.rs:101:38 [INFO] [stdout] | [INFO] [stdout] 101 | .json( &SendMessage {chat_id: chat_id, text: text, reply_markup: reply_markup, parse_mode: parse_mode} ) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `chat_id` [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/botlib/mod.rs:101:56 [INFO] [stdout] | [INFO] [stdout] 101 | .json( &SendMessage {chat_id: chat_id, text: text, reply_markup: reply_markup, parse_mode: parse_mode} ) [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] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/botlib/mod.rs:101:68 [INFO] [stdout] | [INFO] [stdout] 101 | .json( &SendMessage {chat_id: chat_id, text: text, reply_markup: reply_markup, parse_mode: parse_mode} ) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `reply_markup` [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/botlib/mod.rs:101:96 [INFO] [stdout] | [INFO] [stdout] 101 | .json( &SendMessage {chat_id: chat_id, text: text, reply_markup: reply_markup, parse_mode: parse_mode} ) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `parse_mode` [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/botlib/mod.rs:149:44 [INFO] [stdout] | [INFO] [stdout] 149 | .json( &AnswerInlineQuery {inline_query_id: inline_query_id, results: results} ) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `inline_query_id` [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/botlib/mod.rs:149:78 [INFO] [stdout] | [INFO] [stdout] 149 | .json( &AnswerInlineQuery {inline_query_id: inline_query_id, results: results} ) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `results` [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/botlib/mod.rs:201:13 [INFO] [stdout] | [INFO] [stdout] 201 | id: id, [INFO] [stdout] | ^^^^^^ help: replace it with: `id` [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/botlib/mod.rs:211:17 [INFO] [stdout] | [INFO] [stdout] 211 | id: id, [INFO] [stdout] | ^^^^^^ help: replace it with: `id` [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/botlib/mod.rs:257:125 [INFO] [stdout] | [INFO] [stdout] 257 | ...text, callback_data)| InlineKeyboardButton{ text: text, callback_data: Some(callback_data), url: None} ).collect() ).collect() [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] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/botlib/mod.rs:101:38 [INFO] [stdout] | [INFO] [stdout] 101 | .json( &SendMessage {chat_id: chat_id, text: text, reply_markup: reply_markup, parse_mode: parse_mode} ) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `chat_id` [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/botlib/mod.rs:101:56 [INFO] [stdout] | [INFO] [stdout] 101 | .json( &SendMessage {chat_id: chat_id, text: text, reply_markup: reply_markup, parse_mode: parse_mode} ) [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] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/botlib/mod.rs:101:68 [INFO] [stdout] | [INFO] [stdout] 101 | .json( &SendMessage {chat_id: chat_id, text: text, reply_markup: reply_markup, parse_mode: parse_mode} ) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `reply_markup` [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/botlib/mod.rs:101:96 [INFO] [stdout] | [INFO] [stdout] 101 | .json( &SendMessage {chat_id: chat_id, text: text, reply_markup: reply_markup, parse_mode: parse_mode} ) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `parse_mode` [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/botlib/mod.rs:149:44 [INFO] [stdout] | [INFO] [stdout] 149 | .json( &AnswerInlineQuery {inline_query_id: inline_query_id, results: results} ) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `inline_query_id` [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/botlib/mod.rs:149:78 [INFO] [stdout] | [INFO] [stdout] 149 | .json( &AnswerInlineQuery {inline_query_id: inline_query_id, results: results} ) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `results` [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/botlib/mod.rs:201:13 [INFO] [stdout] | [INFO] [stdout] 201 | id: id, [INFO] [stdout] | ^^^^^^ help: replace it with: `id` [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/botlib/mod.rs:211:17 [INFO] [stdout] | [INFO] [stdout] 211 | id: id, [INFO] [stdout] | ^^^^^^ help: replace it with: `id` [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/botlib/mod.rs:257:125 [INFO] [stdout] | [INFO] [stdout] 257 | ...text, callback_data)| InlineKeyboardButton{ text: text, callback_data: Some(callback_data), url: None} ).collect() ).collect() [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] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `disable_web_page_preview` [INFO] [stdout] --> src/botlib/mod.rs:99:93 [INFO] [stdout] | [INFO] [stdout] 99 | ...<&str>, disable_web_page_preview: bool, disable_notification: bool, reply_to_message_id: bool, allow_sending_without_reply: bool,... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_disable_web_page_preview` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `disable_notification` [INFO] [stdout] --> src/botlib/mod.rs:99:125 [INFO] [stdout] | [INFO] [stdout] 99 | ...view: bool, disable_notification: bool, reply_to_message_id: bool, allow_sending_without_reply: bool, reply_markup: Option src/botlib/mod.rs:99:153 [INFO] [stdout] | [INFO] [stdout] 99 | ...ation: bool, reply_to_message_id: bool, allow_sending_without_reply: bool, reply_markup: Option) -> Result<(), BotEr... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_reply_to_message_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `allow_sending_without_reply` [INFO] [stdout] --> src/botlib/mod.rs:99:180 [INFO] [stdout] | [INFO] [stdout] 99 | ...ool, allow_sending_without_reply: bool, reply_markup: Option) -> Result<(), BotError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_allow_sending_without_reply` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `parse_mode` [INFO] [stdout] --> src/botlib/mod.rs:125:84 [INFO] [stdout] | [INFO] [stdout] 125 | pub async fn send_audio(api: String, chat_id: u64, audio: &str, caption: &str, parse_mode: Option<&str>) -> Result<(), BotError> { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_parse_mode` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `botlib::InlineKeyboardMarkup` is more private than the item `botlib::ReplyMarkup::InlineKeyboard::0` [INFO] [stdout] --> src/botlib/datatypes.rs:141:20 [INFO] [stdout] | [INFO] [stdout] 141 | InlineKeyboard(InlineKeyboardMarkup) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ field `botlib::ReplyMarkup::InlineKeyboard::0` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `botlib::InlineKeyboardMarkup` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/botlib/datatypes.rs:145:1 [INFO] [stdout] | [INFO] [stdout] 145 | struct InlineKeyboardMarkup{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `botlib::datatypes::InlineKeyboardMarkup` is more private than the item `botlib::datatypes::ReplyMarkup::InlineKeyboard::0` [INFO] [stdout] --> src/botlib/datatypes.rs:141:20 [INFO] [stdout] | [INFO] [stdout] 141 | InlineKeyboard(InlineKeyboardMarkup) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ field `botlib::datatypes::ReplyMarkup::InlineKeyboard::0` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `botlib::datatypes::InlineKeyboardMarkup` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/botlib/datatypes.rs:145:1 [INFO] [stdout] | [INFO] [stdout] 145 | struct InlineKeyboardMarkup{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Location`, `Venue`, `Contact`, and `Invoice` are never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:114:5 [INFO] [stdout] | [INFO] [stdout] 112 | pub enum InputMessageContent{ [INFO] [stdout] | ------------------- variants in this enum [INFO] [stdout] 113 | Text(InputTextMessageContent), [INFO] [stdout] 114 | Location, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 115 | Venue, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 116 | Contact, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 117 | Invoice [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/botlib/mod.rs:21:18 [INFO] [stdout] | [INFO] [stdout] 21 | NetworkError(String), [INFO] [stdout] | ------------ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `BotError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 21 - NetworkError(String), [INFO] [stdout] 21 + NetworkError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/botlib/mod.rs:24:19 [INFO] [stdout] | [INFO] [stdout] 24 | InternalError(String) [INFO] [stdout] | ------------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `BotError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 24 - InternalError(String) [INFO] [stdout] 24 + InternalError(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `send_audio` and `send_photo` are never used [INFO] [stdout] --> src/botlib/mod.rs:125:18 [INFO] [stdout] | [INFO] [stdout] 34 | impl Telebotapi { [INFO] [stdout] | --------------- associated functions in this implementation [INFO] [stdout] ... [INFO] [stdout] 125 | pub async fn send_audio(api: String, chat_id: u64, audio: &str, caption: &str, parse_mode: Option<&str>) -> Result<(), BotError> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 137 | pub async fn send_photo(api: String, chat_id: u64, photo: Vec){ // photo - bytes of the file [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ReqStatus` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct ReqStatus{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BotInfo` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct BotInfo{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BotUpdate` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 21 | pub struct BotUpdate{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Message` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | pub struct Message{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Chat` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 39 | pub struct Chat{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `User` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:47:12 [INFO] [stdout] | [INFO] [stdout] 47 | pub struct User{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `InlineQuery` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 57 | pub struct InlineQuery{ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AnswerInlineQuery` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | struct AnswerInlineQuery{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `InlineQueryResult` is never used [INFO] [stdout] --> src/botlib/datatypes.rs:73:10 [INFO] [stdout] | [INFO] [stdout] 73 | pub enum InlineQueryResult{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `InlineQueryResultArticle` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:79:12 [INFO] [stdout] | [INFO] [stdout] 79 | pub struct InlineQueryResultArticle{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `InlineQueryResultVoice` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:88:12 [INFO] [stdout] | [INFO] [stdout] 88 | pub struct InlineQueryResultVoice{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CallBackQuery` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:101:12 [INFO] [stdout] | [INFO] [stdout] 101 | pub struct CallBackQuery{ [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `InputMessageContent` is never used [INFO] [stdout] --> src/botlib/datatypes.rs:112:10 [INFO] [stdout] | [INFO] [stdout] 112 | pub enum InputMessageContent{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `InputTextMessageContent` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:121:12 [INFO] [stdout] | [INFO] [stdout] 121 | pub struct InputTextMessageContent{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SendMessage` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:129:8 [INFO] [stdout] | [INFO] [stdout] 129 | struct SendMessage { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ReplyMarkup` is never used [INFO] [stdout] --> src/botlib/datatypes.rs:140:10 [INFO] [stdout] | [INFO] [stdout] 140 | pub enum ReplyMarkup{ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `InlineKeyboardMarkup` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:145:8 [INFO] [stdout] | [INFO] [stdout] 145 | struct InlineKeyboardMarkup{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `InlineKeyboardButton` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:150:8 [INFO] [stdout] | [INFO] [stdout] 150 | struct InlineKeyboardButton{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `disable_web_page_preview` [INFO] [stdout] --> src/botlib/mod.rs:99:93 [INFO] [stdout] | [INFO] [stdout] 99 | ...<&str>, disable_web_page_preview: bool, disable_notification: bool, reply_to_message_id: bool, allow_sending_without_reply: bool,... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_disable_web_page_preview` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `disable_notification` [INFO] [stdout] --> src/botlib/mod.rs:99:125 [INFO] [stdout] | [INFO] [stdout] 99 | ...view: bool, disable_notification: bool, reply_to_message_id: bool, allow_sending_without_reply: bool, reply_markup: Option src/botlib/mod.rs:99:153 [INFO] [stdout] | [INFO] [stdout] 99 | ...ation: bool, reply_to_message_id: bool, allow_sending_without_reply: bool, reply_markup: Option) -> Result<(), BotEr... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_reply_to_message_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `allow_sending_without_reply` [INFO] [stdout] --> src/botlib/mod.rs:99:180 [INFO] [stdout] | [INFO] [stdout] 99 | ...ool, allow_sending_without_reply: bool, reply_markup: Option) -> Result<(), BotError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_allow_sending_without_reply` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `parse_mode` [INFO] [stdout] --> src/botlib/mod.rs:125:84 [INFO] [stdout] | [INFO] [stdout] 125 | pub async fn send_audio(api: String, chat_id: u64, audio: &str, caption: &str, parse_mode: Option<&str>) -> Result<(), BotError> { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_parse_mode` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `botlib::InlineKeyboardMarkup` is more private than the item `botlib::ReplyMarkup::InlineKeyboard::0` [INFO] [stdout] --> src/botlib/datatypes.rs:141:20 [INFO] [stdout] | [INFO] [stdout] 141 | InlineKeyboard(InlineKeyboardMarkup) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ field `botlib::ReplyMarkup::InlineKeyboard::0` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `botlib::InlineKeyboardMarkup` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/botlib/datatypes.rs:145:1 [INFO] [stdout] | [INFO] [stdout] 145 | struct InlineKeyboardMarkup{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `botlib::datatypes::InlineKeyboardMarkup` is more private than the item `botlib::datatypes::ReplyMarkup::InlineKeyboard::0` [INFO] [stdout] --> src/botlib/datatypes.rs:141:20 [INFO] [stdout] | [INFO] [stdout] 141 | InlineKeyboard(InlineKeyboardMarkup) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ field `botlib::datatypes::ReplyMarkup::InlineKeyboard::0` is reachable at visibility `pub(crate)` [INFO] [stdout] | [INFO] [stdout] note: but type `botlib::datatypes::InlineKeyboardMarkup` is only usable at visibility `pub(self)` [INFO] [stdout] --> src/botlib/datatypes.rs:145:1 [INFO] [stdout] | [INFO] [stdout] 145 | struct InlineKeyboardMarkup{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Location`, `Venue`, `Contact`, and `Invoice` are never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:114:5 [INFO] [stdout] | [INFO] [stdout] 112 | pub enum InputMessageContent{ [INFO] [stdout] | ------------------- variants in this enum [INFO] [stdout] 113 | Text(InputTextMessageContent), [INFO] [stdout] 114 | Location, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 115 | Venue, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 116 | Contact, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 117 | Invoice [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/botlib/mod.rs:21:18 [INFO] [stdout] | [INFO] [stdout] 21 | NetworkError(String), [INFO] [stdout] | ------------ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `BotError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 21 - NetworkError(String), [INFO] [stdout] 21 + NetworkError(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/botlib/mod.rs:24:19 [INFO] [stdout] | [INFO] [stdout] 24 | InternalError(String) [INFO] [stdout] | ------------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `BotError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 24 - InternalError(String) [INFO] [stdout] 24 + InternalError(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `send_audio` and `send_photo` are never used [INFO] [stdout] --> src/botlib/mod.rs:125:18 [INFO] [stdout] | [INFO] [stdout] 34 | impl Telebotapi { [INFO] [stdout] | --------------- associated functions in this implementation [INFO] [stdout] ... [INFO] [stdout] 125 | pub async fn send_audio(api: String, chat_id: u64, audio: &str, caption: &str, parse_mode: Option<&str>) -> Result<(), BotError> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 137 | pub async fn send_photo(api: String, chat_id: u64, photo: Vec){ // photo - bytes of the file [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ReqStatus` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | struct ReqStatus{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BotInfo` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | struct BotInfo{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BotUpdate` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:21:12 [INFO] [stdout] | [INFO] [stdout] 21 | pub struct BotUpdate{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Message` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 30 | pub struct Message{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Chat` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:39:12 [INFO] [stdout] | [INFO] [stdout] 39 | pub struct Chat{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `User` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:47:12 [INFO] [stdout] | [INFO] [stdout] 47 | pub struct User{ [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `InlineQuery` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 57 | pub struct InlineQuery{ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AnswerInlineQuery` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | struct AnswerInlineQuery{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `InlineQueryResult` is never used [INFO] [stdout] --> src/botlib/datatypes.rs:73:10 [INFO] [stdout] | [INFO] [stdout] 73 | pub enum InlineQueryResult{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `InlineQueryResultArticle` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:79:12 [INFO] [stdout] | [INFO] [stdout] 79 | pub struct InlineQueryResultArticle{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `InlineQueryResultVoice` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:88:12 [INFO] [stdout] | [INFO] [stdout] 88 | pub struct InlineQueryResultVoice{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CallBackQuery` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:101:12 [INFO] [stdout] | [INFO] [stdout] 101 | pub struct CallBackQuery{ [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `InputMessageContent` is never used [INFO] [stdout] --> src/botlib/datatypes.rs:112:10 [INFO] [stdout] | [INFO] [stdout] 112 | pub enum InputMessageContent{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `InputTextMessageContent` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:121:12 [INFO] [stdout] | [INFO] [stdout] 121 | pub struct InputTextMessageContent{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SendMessage` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:129:8 [INFO] [stdout] | [INFO] [stdout] 129 | struct SendMessage { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ReplyMarkup` is never used [INFO] [stdout] --> src/botlib/datatypes.rs:140:10 [INFO] [stdout] | [INFO] [stdout] 140 | pub enum ReplyMarkup{ [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `InlineKeyboardMarkup` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:145:8 [INFO] [stdout] | [INFO] [stdout] 145 | struct InlineKeyboardMarkup{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `InlineKeyboardButton` is never constructed [INFO] [stdout] --> src/botlib/datatypes.rs:150:8 [INFO] [stdout] | [INFO] [stdout] 150 | struct InlineKeyboardButton{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/botlib/mod.rs:16:17 [INFO] [stdout] | [INFO] [stdout] 16 | pub handle: Option) -> ()>> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/botlib/mod.rs:69:32 [INFO] [stdout] | [INFO] [stdout] 69 | ... if !request.message.is_none(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.message.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/botlib/mod.rs:75:39 [INFO] [stdout] | [INFO] [stdout] 75 | ... } else if !request.callback_query.is_none(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.callback_query.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/botlib/mod.rs:56:16 [INFO] [stdout] | [INFO] [stdout] 56 | if req.result.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!req.result.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: using `clone` on type `fn(String, Arc)` which implements the `Copy` trait [INFO] [stdout] --> src/botlib/mod.rs:64:40 [INFO] [stdout] | [INFO] [stdout] 64 | ... let func = func.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `()` which implements the `Copy` trait [INFO] [stdout] --> src/botlib/mod.rs:65:52 [INFO] [stdout] | [INFO] [stdout] 65 | ... thread::spawn( move || func(api, last_rec).clone() ); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func(api, last_rec)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/botlib/mod.rs:65:52 [INFO] [stdout] | [INFO] [stdout] 65 | ... thread::spawn( move || func(api, last_rec).clone() ); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 65 ~ thread::spawn( move || { [INFO] [stdout] 66 + let _: () = func(api, last_rec); [INFO] [stdout] 67 + ().clone() [INFO] [stdout] 68 ~ } ); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `fn(String, Arc)` which implements the `Copy` trait [INFO] [stdout] --> src/botlib/mod.rs:72:48 [INFO] [stdout] | [INFO] [stdout] 72 | ... let func = func.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `fn(String, Arc)` which implements the `Copy` trait [INFO] [stdout] --> src/botlib/mod.rs:78:48 [INFO] [stdout] | [INFO] [stdout] 78 | ... let func = func.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/botlib/mod.rs:86:61 [INFO] [stdout] | [INFO] [stdout] 86 | let _ = reqwest::Client::new().post(&format!("https://api.telegram.org/bot{}/sendMessage", self.api)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("https://api.telegram.org/bot{}/sendMessage", self.api)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/botlib/mod.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | pub async fn send_text(api: String, chat_id: u64, text: &str, parse_mode: Option<&str>, disable_web_page_preview: bool, disable_notification: bool, reply_to_message_id: bool, allow_sending_without_reply: bool, reply_markup: Option) -> Result<(), BotError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/botlib/mod.rs:110:12 [INFO] [stdout] | [INFO] [stdout] 110 | if voice.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `voice.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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/botlib/mod.rs:182:16 [INFO] [stdout] | [INFO] [stdout] 182 | if let Some(_) = &other.inline_query{ [INFO] [stdout] | -------^^^^^^^---------------------- help: try: `if other.inline_query.is_some()` [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: unneeded `return` statement [INFO] [stdout] --> src/botlib/mod.rs:209:13 [INFO] [stdout] | [INFO] [stdout] 209 | / return Ok(InlineQueryResult::Voice( InlineQueryResultVoice { [INFO] [stdout] 210 | | query_type: String::from("voice"), [INFO] [stdout] 211 | | id: id, [INFO] [stdout] 212 | | title: title.to_string(), [INFO] [stdout] ... | [INFO] [stdout] 216 | | })) [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] 209 ~ Ok(InlineQueryResult::Voice( InlineQueryResultVoice { [INFO] [stdout] 210 + query_type: String::from("voice"), [INFO] [stdout] 211 + id: id, [INFO] [stdout] 212 + title: title.to_string(), [INFO] [stdout] 213 + voice_url: voice_url.to_string(), [INFO] [stdout] 214 + caption: Some(caption.to_string()), [INFO] [stdout] 215 + // parse_mode: Some(parse_mode.to_string()) [INFO] [stdout] 216 + })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:18:24 [INFO] [stdout] | [INFO] [stdout] 18 | if responce_vec.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!responce_vec.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: useless use of `format!` [INFO] [stdout] --> src/main.rs:26:123 [INFO] [stdout] | [INFO] [stdout] 26 | ... responce_vec.into_iter().map( |word| vec![ (word.to_string(), format!("{}", word) ) ] ).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `word.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: length comparison to zero [INFO] [stdout] --> src/main.rs:61:43 [INFO] [stdout] | [INFO] [stdout] 61 | ...vec) => { if responce_vec.len() > 0 { ( format!("Definition for word {}", responce_vec[0]), format!("{}", search_word_def!( &resp... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!responce_vec.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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/botlib/mod.rs:16:17 [INFO] [stdout] | [INFO] [stdout] 16 | pub handle: Option) -> ()>> [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/botlib/mod.rs:69:32 [INFO] [stdout] | [INFO] [stdout] 69 | ... if !request.message.is_none(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.message.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/botlib/mod.rs:75:39 [INFO] [stdout] | [INFO] [stdout] 75 | ... } else if !request.callback_query.is_none(){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `request.callback_query.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/botlib/mod.rs:56:16 [INFO] [stdout] | [INFO] [stdout] 56 | if req.result.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!req.result.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: using `clone` on type `fn(String, Arc)` which implements the `Copy` trait [INFO] [stdout] --> src/botlib/mod.rs:64:40 [INFO] [stdout] | [INFO] [stdout] 64 | ... let func = func.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `()` which implements the `Copy` trait [INFO] [stdout] --> src/botlib/mod.rs:65:52 [INFO] [stdout] | [INFO] [stdout] 65 | ... thread::spawn( move || func(api, last_rec).clone() ); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `func(api, last_rec)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/botlib/mod.rs:65:52 [INFO] [stdout] | [INFO] [stdout] 65 | ... thread::spawn( move || func(api, last_rec).clone() ); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 65 ~ thread::spawn( move || { [INFO] [stdout] 66 + let _: () = func(api, last_rec); [INFO] [stdout] 67 + ().clone() [INFO] [stdout] 68 ~ } ); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `fn(String, Arc)` which implements the `Copy` trait [INFO] [stdout] --> src/botlib/mod.rs:72:48 [INFO] [stdout] | [INFO] [stdout] 72 | ... let func = func.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `fn(String, Arc)` which implements the `Copy` trait [INFO] [stdout] --> src/botlib/mod.rs:78:48 [INFO] [stdout] | [INFO] [stdout] 78 | ... let func = func.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*func` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/botlib/mod.rs:86:61 [INFO] [stdout] | [INFO] [stdout] 86 | let _ = reqwest::Client::new().post(&format!("https://api.telegram.org/bot{}/sendMessage", self.api)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("https://api.telegram.org/bot{}/sendMessage", self.api)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> src/botlib/mod.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | pub async fn send_text(api: String, chat_id: u64, text: &str, parse_mode: Option<&str>, disable_web_page_preview: bool, disable_notification: bool, reply_to_message_id: bool, allow_sending_without_reply: bool, reply_markup: Option) -> Result<(), BotError> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/botlib/mod.rs:110:12 [INFO] [stdout] | [INFO] [stdout] 110 | if voice.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `voice.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: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/botlib/mod.rs:182:16 [INFO] [stdout] | [INFO] [stdout] 182 | if let Some(_) = &other.inline_query{ [INFO] [stdout] | -------^^^^^^^---------------------- help: try: `if other.inline_query.is_some()` [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: unneeded `return` statement [INFO] [stdout] --> src/botlib/mod.rs:209:13 [INFO] [stdout] | [INFO] [stdout] 209 | / return Ok(InlineQueryResult::Voice( InlineQueryResultVoice { [INFO] [stdout] 210 | | query_type: String::from("voice"), [INFO] [stdout] 211 | | id: id, [INFO] [stdout] 212 | | title: title.to_string(), [INFO] [stdout] ... | [INFO] [stdout] 216 | | })) [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] 209 ~ Ok(InlineQueryResult::Voice( InlineQueryResultVoice { [INFO] [stdout] 210 + query_type: String::from("voice"), [INFO] [stdout] 211 + id: id, [INFO] [stdout] 212 + title: title.to_string(), [INFO] [stdout] 213 + voice_url: voice_url.to_string(), [INFO] [stdout] 214 + caption: Some(caption.to_string()), [INFO] [stdout] 215 + // parse_mode: Some(parse_mode.to_string()) [INFO] [stdout] 216 + })) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/main.rs:18:24 [INFO] [stdout] | [INFO] [stdout] 18 | if responce_vec.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!responce_vec.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: useless use of `format!` [INFO] [stdout] --> src/main.rs:26:123 [INFO] [stdout] | [INFO] [stdout] 26 | ... responce_vec.into_iter().map( |word| vec![ (word.to_string(), format!("{}", word) ) ] ).collect() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `word.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: length comparison to zero [INFO] [stdout] --> src/main.rs:61:43 [INFO] [stdout] | [INFO] [stdout] 61 | ...vec) => { if responce_vec.len() > 0 { ( format!("Definition for word {}", responce_vec[0]), format!("{}", search_word_def!( &resp... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!responce_vec.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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 23.37s [INFO] running `Command { std: "docker" "inspect" "ff2fe3d8f13df69ff6e0342a3dc49fceb1fa02e6f3f3322494e1c937db69ed62", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ff2fe3d8f13df69ff6e0342a3dc49fceb1fa02e6f3f3322494e1c937db69ed62", kill_on_drop: false }` [INFO] [stdout] ff2fe3d8f13df69ff6e0342a3dc49fceb1fa02e6f3f3322494e1c937db69ed62