[INFO] cloning repository https://github.com/icsboyx/bottarga [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/icsboyx/bottarga" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ficsboyx%2Fbottarga", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ficsboyx%2Fbottarga'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 62706ab12d204d2462e3d3aeeb591e01c29a2076 [INFO] linting icsboyx/bottarga against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ficsboyx%2Fbottarga" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/icsboyx/bottarga [INFO] finished tweaking git repo https://github.com/icsboyx/bottarga [INFO] tweaked toml for git repo https://github.com/icsboyx/bottarga written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/icsboyx/bottarga 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/icsboyx/bottarga 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] Updating crates.io index [INFO] [stderr] Updating git repository `https://github.com/icsboyx/msedge-tts.git` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded extended v0.1.0 [INFO] [stderr] Downloaded symphonia-codec-pcm v0.5.5 [INFO] [stderr] Downloaded symphonia-utils-xiph v0.5.5 [INFO] [stderr] Downloaded symphonia-metadata v0.5.5 [INFO] [stderr] Downloaded atomic-arena v0.1.2 [INFO] [stderr] Downloaded libpulse-simple-sys v1.22.0 [INFO] [stderr] Downloaded symphonia-bundle-flac v0.5.5 [INFO] [stderr] Downloaded json_to_table v0.10.0 [INFO] [stderr] Downloaded async-native-tls v0.5.0 [INFO] [stderr] Downloaded papergrid v0.14.0 [INFO] [stderr] Downloaded symphonia-bundle-mp3 v0.5.5 [INFO] [stderr] Downloaded curl v0.4.49 [INFO] [stderr] Downloaded kira v0.10.8 [INFO] [stderr] Downloaded libpulse-sys v1.23.0 [INFO] [stderr] Downloaded async-tungstenite v0.28.2 [INFO] [stderr] Downloaded libpulse-binding v2.30.1 [INFO] [stderr] Downloaded symphonia-core v0.5.5 [INFO] [stderr] Downloaded rtrb v0.3.2 [INFO] [stderr] Downloaded triple_buffer v8.1.1 [INFO] [stderr] Downloaded tabled v0.18.0 [INFO] [stderr] Downloaded symphonia-codec-vorbis v0.5.5 [INFO] [stderr] Downloaded symphonia-format-ogg v0.5.5 [INFO] [stderr] Downloaded symphonia-format-riff v0.5.5 [INFO] [stderr] Downloaded libpulse-simple-binding v2.29.0 [INFO] [stderr] Downloaded symphonia v0.5.5 [INFO] [stderr] Downloaded libnghttp2-sys v0.1.11+1.64.0 [INFO] [stderr] Downloaded curl-sys v0.4.84+curl-8.17.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 9d77abed48ce7cc939b1b99620d347cb893fb77caee861ab4a576db296b6c218 [INFO] running `Command { std: "docker" "start" "-a" "9d77abed48ce7cc939b1b99620d347cb893fb77caee861ab4a576db296b6c218", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9d77abed48ce7cc939b1b99620d347cb893fb77caee861ab4a576db296b6c218", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9d77abed48ce7cc939b1b99620d347cb893fb77caee861ab4a576db296b6c218", kill_on_drop: false }` [INFO] [stdout] 9d77abed48ce7cc939b1b99620d347cb893fb77caee861ab4a576db296b6c218 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] dc6daed9171b7e70d892554b503bed8dc104e0079e0a6d6ff2a22f836b21c405 [INFO] running `Command { std: "docker" "start" "-a" "dc6daed9171b7e70d892554b503bed8dc104e0079e0a6d6ff2a22f836b21c405", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.105 [INFO] [stderr] Compiling quote v1.0.43 [INFO] [stderr] Compiling find-msvc-tools v0.1.6 [INFO] [stderr] Checking value-bag v1.12.0 [INFO] [stderr] Compiling openssl v0.10.75 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking event-listener v5.4.1 [INFO] [stderr] Compiling rustix v1.1.3 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Checking event-listener-strategy v0.5.4 [INFO] [stderr] Compiling cc v1.2.51 [INFO] [stderr] Checking futures-lite v2.6.1 [INFO] [stderr] Checking log v0.4.29 [INFO] [stderr] Checking socket2 v0.6.1 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Compiling async-io v2.6.0 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Compiling libpulse-sys v1.23.0 [INFO] [stderr] Checking symphonia-core v0.5.5 [INFO] [stderr] Compiling alsa-sys v0.3.1 [INFO] [stderr] Checking event-listener v2.5.3 [INFO] [stderr] Compiling zmij v1.0.12 [INFO] [stderr] Checking percent-encoding v2.3.2 [INFO] [stderr] Checking piper v0.2.4 [INFO] [stderr] Checking async-channel v1.9.0 [INFO] [stderr] Checking form_urlencoded v1.2.2 [INFO] [stderr] Compiling syn v2.0.114 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking async-channel v2.5.0 [INFO] [stderr] Checking async-executor v1.13.3 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking blocking v1.6.2 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Checking async-lock v3.4.2 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Compiling openssl-sys v0.9.111 [INFO] [stderr] Compiling libnghttp2-sys v0.1.11+1.64.0 [INFO] [stderr] Compiling libz-sys v1.1.23 [INFO] [stderr] Checking symphonia-metadata v0.5.5 [INFO] [stderr] Compiling curl-sys v0.4.84+curl-8.17.0 [INFO] [stderr] Compiling polling v2.8.0 [INFO] [stderr] Checking symphonia-utils-xiph v0.5.5 [INFO] [stderr] Compiling curl v0.4.49 [INFO] [stderr] Compiling cpal v0.15.3 [INFO] [stderr] Checking extended v0.1.0 [INFO] [stderr] Checking symphonia-format-riff v0.5.5 [INFO] [stderr] Checking symphonia-bundle-flac v0.5.5 [INFO] [stderr] Checking symphonia-format-ogg v0.5.5 [INFO] [stderr] Checking symphonia-codec-vorbis v0.5.5 [INFO] [stderr] Checking symphonia-bundle-mp3 v0.5.5 [INFO] [stderr] Checking symphonia-codec-pcm v0.5.5 [INFO] [stderr] Checking alsa v0.9.1 [INFO] [stderr] Checking serde_json v1.0.149 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking kv-log-macro v1.0.7 [INFO] [stderr] Compiling libpulse-simple-sys v1.22.0 [INFO] [stderr] Compiling isahc v1.7.2 [INFO] [stderr] Checking dasp_sample v0.11.0 [INFO] [stderr] Checking polling v3.11.0 [INFO] [stderr] Checking waker-fn v1.2.0 [INFO] [stderr] Checking fastrand v1.9.0 [INFO] [stderr] Checking bytecount v0.6.9 [INFO] [stderr] Checking papergrid v0.14.0 [INFO] [stderr] Checking symphonia v0.5.5 [INFO] [stderr] Checking futures-lite v1.13.0 [INFO] [stderr] Checking async-global-executor v2.4.1 [INFO] [stderr] Checking sluice v0.5.5 [INFO] [stderr] Checking ogg v0.8.0 [INFO] [stderr] Checking http v0.2.12 [INFO] [stderr] Checking async-std v1.13.2 [INFO] [stderr] Checking toml_write v0.1.2 [INFO] [stderr] Checking winnow v0.7.14 [INFO] [stderr] Checking mint v0.5.9 [INFO] [stderr] Checking castaway v0.1.2 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Checking glam v0.30.10 [INFO] [stderr] Checking chrono v0.4.42 [INFO] [stderr] Checking tabled v0.18.0 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Checking lewton v0.10.2 [INFO] [stderr] Checking uuid v1.19.0 [INFO] [stderr] Checking triple_buffer v8.1.1 [INFO] [stderr] Checking hound v3.5.1 [INFO] [stderr] Checking atomic-arena v0.1.2 [INFO] [stderr] Checking rtrb v0.3.2 [INFO] [stderr] Checking claxon v0.4.3 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Checking colored v3.0.0 [INFO] [stderr] Checking rodio v0.20.1 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [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 futures-macro v0.3.31 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.1 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking zerovec v0.11.5 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking potential_utf v0.1.4 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Compiling num-derive v0.4.2 [INFO] [stderr] Compiling pin-project-internal v1.1.10 [INFO] [stderr] Checking thiserror v2.0.17 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Checking tokio v1.49.0 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Checking tungstenite v0.24.0 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking libpulse-binding v2.30.1 [INFO] [stderr] Checking pin-project v1.1.10 [INFO] [stderr] Checking tracing-futures v0.2.5 [INFO] [stderr] Checking serde_spanned v0.6.9 [INFO] [stderr] Checking toml_datetime v0.6.11 [INFO] [stderr] Checking tungstenite v0.26.2 [INFO] [stderr] Checking async-native-tls v0.5.0 [INFO] [stderr] Checking kira v0.10.8 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking toml_edit v0.22.27 [INFO] [stderr] Checking json_to_table v0.10.0 [INFO] [stderr] Checking async-tungstenite v0.28.2 [INFO] [stderr] Checking libpulse-simple-binding v2.29.0 [INFO] [stderr] Checking toml v0.8.23 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking tokio-stream v0.1.18 [INFO] [stderr] Checking tokio-tungstenite v0.26.2 [INFO] [stderr] Checking msedge-tts v0.2.4 (https://github.com/icsboyx/msedge-tts.git#ed2cc3c8) [INFO] [stderr] Checking bottarga v0.1.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `log` [INFO] [stdout] --> src/twitch_client.rs:17:25 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::{CONFIG_DIR, log}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/twitch_client.rs:275:20 [INFO] [stdout] | [INFO] [stdout] 275 | if last.len() + word.len() + 1 <= TWITCH_MAX_MSG_LINE_LENGTH { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `last.len() + word.len() < TWITCH_MAX_MSG_LINE_LENGTH` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `log` [INFO] [stdout] --> src/twitch_client.rs:17:25 [INFO] [stdout] | [INFO] [stdout] 17 | use crate::{CONFIG_DIR, log}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/twitch_client.rs:275:20 [INFO] [stdout] | [INFO] [stdout] 275 | if last.len() + word.len() + 1 <= TWITCH_MAX_MSG_LINE_LENGTH { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `last.len() + word.len() < TWITCH_MAX_MSG_LINE_LENGTH` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `config_dir` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:21:23 [INFO] [stdout] | [INFO] [stdout] 19 | let file_path = if config_dir.is_some() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = config_dir` [INFO] [stdout] 20 | PathBuf::from(std::env::current_dir().unwrap()) [INFO] [stdout] 21 | .join(config_dir.unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/common.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | PathBuf::from(std::env::current_dir().unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `std::env::current_dir().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/common.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | PathBuf::from(std::env::current_dir().unwrap()).join(&file_name) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `std::env::current_dir().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/common.rs:51:48 [INFO] [stdout] | [INFO] [stdout] 51 | async fn check_file_path(&self, file_path: &PathBuf) -> Result<()> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 51 - async fn check_file_path(&self, file_path: &PathBuf) -> Result<()> { [INFO] [stdout] 51 + async fn check_file_path(&self, file_path: &Path) -> Result<()> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/common.rs:53:16 [INFO] [stdout] | [INFO] [stdout] 53 | if !metadata(parent).await.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `metadata(parent).await.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/common.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | / if let Some(parent) = file_path.parent() { [INFO] [stdout] 53 | | if !metadata(parent).await.is_ok() { [INFO] [stdout] 54 | | log!("Parent directory does not exist, creating: {}", parent.display()); [INFO] [stdout] 55 | | match create_dir_all(parent).await { [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 52 ~ if let Some(parent) = file_path.parent() [INFO] [stdout] 53 ~ && !metadata(parent).await.is_ok() { [INFO] [stdout] 54 | log!("Parent directory does not exist, creating: {}", parent.display()); [INFO] [stdout] ... [INFO] [stdout] 61 | } [INFO] [stdout] 62 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `config_dir` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:74:23 [INFO] [stdout] | [INFO] [stdout] 72 | let file_path = if config_dir.is_some() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = config_dir` [INFO] [stdout] 73 | PathBuf::from(std::env::current_dir().unwrap()) [INFO] [stdout] 74 | .join(config_dir.unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/common.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | PathBuf::from(std::env::current_dir().unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `std::env::current_dir().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/common.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | PathBuf::from(std::env::current_dir().unwrap()).join(&file_name) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `std::env::current_dir().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MSGQueue` [INFO] [stdout] --> src/common.rs:152:5 [INFO] [stdout] | [INFO] [stdout] 152 | / pub fn new() -> Self { [INFO] [stdout] 153 | | Self { [INFO] [stdout] 154 | | queue: RwLock::new(VecDeque::new()), [INFO] [stdout] 155 | | notify: Arc::new(tokio::sync::Notify::new()), [INFO] [stdout] 156 | | } [INFO] [stdout] 157 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 148 + impl Default for MSGQueue [INFO] [stdout] 149 + where [INFO] [stdout] 150 + T: Sync + Send + Clone + Debug + 'static, [INFO] [stdout] 151 + { [INFO] [stdout] 152 + fn default() -> Self { [INFO] [stdout] 153 + Self::new() [INFO] [stdout] 154 + } [INFO] [stdout] 155 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MSGQueue` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/common.rs:182:5 [INFO] [stdout] | [INFO] [stdout] 182 | pub async fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/audio_player.rs:29:73 [INFO] [stdout] | [INFO] [stdout] 29 | pub static TTS_AUDIO_QUEUE: LazyLock>> = LazyLock::new(|| MSGQueue::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `MSGQueue::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/audio_player.rs:30:74 [INFO] [stdout] | [INFO] [stdout] 30 | pub static TTS_AUDIO_CONTROL: LazyLock = LazyLock::new(|| AudioPlayControl::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `AudioPlayControl::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `AudioPlayControl` [INFO] [stdout] --> src/audio_player.rs:72:5 [INFO] [stdout] | [INFO] [stdout] 72 | / pub fn new() -> Self { [INFO] [stdout] 73 | | Self { [INFO] [stdout] 74 | | status: Arc::new(RwLock::new(PlayerCommands::Ready)), [INFO] [stdout] 75 | | notify: Arc::new(tokio::sync::Notify::new()), [INFO] [stdout] 76 | | } [INFO] [stdout] 77 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 71 + impl Default for AudioPlayControl { [INFO] [stdout] 72 + fn default() -> Self { [INFO] [stdout] 73 + Self::new() [INFO] [stdout] 74 + } [INFO] [stdout] 75 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/audio_player.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 104 | let event = self.status.read().await.clone(); [INFO] [stdout] | --------------------------------------------- unnecessary `let` binding [INFO] [stdout] 105 | event [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 104 ~ [INFO] [stdout] 105 ~ self.status.read().await.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `config_dir` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:21:23 [INFO] [stdout] | [INFO] [stdout] 19 | let file_path = if config_dir.is_some() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = config_dir` [INFO] [stdout] 20 | PathBuf::from(std::env::current_dir().unwrap()) [INFO] [stdout] 21 | .join(config_dir.unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/common.rs:20:13 [INFO] [stdout] | [INFO] [stdout] 20 | PathBuf::from(std::env::current_dir().unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `std::env::current_dir().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/common.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | PathBuf::from(std::env::current_dir().unwrap()).join(&file_name) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `std::env::current_dir().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bot_commands.rs:15:64 [INFO] [stdout] | [INFO] [stdout] 15 | pub static BOT_COMMANDS: LazyLock = LazyLock::new(|| BotCommands::default()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BotCommands::default` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> src/common.rs:51:48 [INFO] [stdout] | [INFO] [stdout] 51 | async fn check_file_path(&self, file_path: &PathBuf) -> Result<()> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 51 - async fn check_file_path(&self, file_path: &PathBuf) -> Result<()> { [INFO] [stdout] 51 + async fn check_file_path(&self, file_path: &Path) -> Result<()> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/common.rs:53:16 [INFO] [stdout] | [INFO] [stdout] 53 | if !metadata(parent).await.is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `metadata(parent).await.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/common.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | / if let Some(parent) = file_path.parent() { [INFO] [stdout] 53 | | if !metadata(parent).await.is_ok() { [INFO] [stdout] 54 | | log!("Parent directory does not exist, creating: {}", parent.display()); [INFO] [stdout] 55 | | match create_dir_all(parent).await { [INFO] [stdout] ... | [INFO] [stdout] 63 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 52 ~ if let Some(parent) = file_path.parent() [INFO] [stdout] 53 ~ && !metadata(parent).await.is_ok() { [INFO] [stdout] 54 | log!("Parent directory does not exist, creating: {}", parent.display()); [INFO] [stdout] ... [INFO] [stdout] 61 | } [INFO] [stdout] 62 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's keys [INFO] [stdout] --> src/bot_commands.rs:82:20 [INFO] [stdout] | [INFO] [stdout] 82 | let triggers = BOT_COMMANDS [INFO] [stdout] | ____________________^ [INFO] [stdout] 83 | | .commands [INFO] [stdout] 84 | | .read() [INFO] [stdout] 85 | | .await [INFO] [stdout] 86 | | .iter() [INFO] [stdout] 87 | | .map(|(trigger, _)| format!("{}{}", BOT_COMMAND_PREFIX, trigger)) [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 82 ~ let triggers = BOT_COMMANDS [INFO] [stdout] 83 + .commands [INFO] [stdout] 84 + .read() [INFO] [stdout] 85 + .await.keys().map(|trigger| format!("{}{}", BOT_COMMAND_PREFIX, trigger)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `config_dir` after checking its variant with `is_some` [INFO] [stdout] --> src/common.rs:74:23 [INFO] [stdout] | [INFO] [stdout] 72 | let file_path = if config_dir.is_some() { [INFO] [stdout] | ----------------------- help: try: `if let Some() = config_dir` [INFO] [stdout] 73 | PathBuf::from(std::env::current_dir().unwrap()) [INFO] [stdout] 74 | .join(config_dir.unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/common.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | PathBuf::from(std::env::current_dir().unwrap()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `std::env::current_dir().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::path::PathBuf` [INFO] [stdout] --> src/common.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | PathBuf::from(std::env::current_dir().unwrap()).join(&file_name) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `PathBuf::from()`: `std::env::current_dir().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bot_external_commands.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 73 | let ret_val = block_on(ExternalBotCommands::load(CONFIG_DIR)); [INFO] [stdout] | -------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 74 | ret_val [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 73 ~ [INFO] [stdout] 74 ~ block_on(ExternalBotCommands::load(CONFIG_DIR)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `MSGQueue` [INFO] [stdout] --> src/common.rs:152:5 [INFO] [stdout] | [INFO] [stdout] 152 | / pub fn new() -> Self { [INFO] [stdout] 153 | | Self { [INFO] [stdout] 154 | | queue: RwLock::new(VecDeque::new()), [INFO] [stdout] 155 | | notify: Arc::new(tokio::sync::Notify::new()), [INFO] [stdout] 156 | | } [INFO] [stdout] 157 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 148 + impl Default for MSGQueue [INFO] [stdout] 149 + where [INFO] [stdout] 150 + T: Sync + Send + Clone + Debug + 'static, [INFO] [stdout] 151 + { [INFO] [stdout] 152 + fn default() -> Self { [INFO] [stdout] 153 + Self::new() [INFO] [stdout] 154 + } [INFO] [stdout] 155 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MSGQueue` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/common.rs:182:5 [INFO] [stdout] | [INFO] [stdout] 182 | pub async fn len(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/audio_player.rs:29:73 [INFO] [stdout] | [INFO] [stdout] 29 | pub static TTS_AUDIO_QUEUE: LazyLock>> = LazyLock::new(|| MSGQueue::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `MSGQueue::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/audio_player.rs:30:74 [INFO] [stdout] | [INFO] [stdout] 30 | pub static TTS_AUDIO_CONTROL: LazyLock = LazyLock::new(|| AudioPlayControl::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `AudioPlayControl::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `AudioPlayControl` [INFO] [stdout] --> src/audio_player.rs:72:5 [INFO] [stdout] | [INFO] [stdout] 72 | / pub fn new() -> Self { [INFO] [stdout] 73 | | Self { [INFO] [stdout] 74 | | status: Arc::new(RwLock::new(PlayerCommands::Ready)), [INFO] [stdout] 75 | | notify: Arc::new(tokio::sync::Notify::new()), [INFO] [stdout] 76 | | } [INFO] [stdout] 77 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 71 + impl Default for AudioPlayControl { [INFO] [stdout] 72 + fn default() -> Self { [INFO] [stdout] 73 + Self::new() [INFO] [stdout] 74 + } [INFO] [stdout] 75 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/audio_player.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 104 | let event = self.status.read().await.clone(); [INFO] [stdout] | --------------------------------------------- unnecessary `let` binding [INFO] [stdout] 105 | event [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 104 ~ [INFO] [stdout] 105 ~ self.status.read().await.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/irc_parser.rs:84:5 [INFO] [stdout] | [INFO] [stdout] 78 | / let irc_message = IrcMessage::new( [INFO] [stdout] 79 | | parse_irc_message_token(token), [INFO] [stdout] 80 | | parse_irc_message_context(context), [INFO] [stdout] 81 | | payload, [INFO] [stdout] 82 | | ); [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 83 | [INFO] [stdout] 84 | irc_message [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 78 ~ [INFO] [stdout] 79 | [INFO] [stdout] 80 ~ IrcMessage::new( [INFO] [stdout] 81 + parse_irc_message_token(token), [INFO] [stdout] 82 + parse_irc_message_context(context), [INFO] [stdout] 83 + payload, [INFO] [stdout] 84 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `msg_arr.get(0)` [INFO] [stdout] --> src/irc_parser.rs:73:23 [INFO] [stdout] | [INFO] [stdout] 73 | context = msg_arr.get(0).unwrap_or(&"").trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `msg_arr.first()` [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] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `context_arr.get(0)` [INFO] [stdout] --> src/irc_parser.rs:95:23 [INFO] [stdout] | [INFO] [stdout] 95 | let sender_full = context_arr.get(0).unwrap_or(&"").trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `context_arr.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 `sender_full [INFO] [stdout] .split('!') [INFO] [stdout] .collect::>().get(0)` [INFO] [stdout] --> src/irc_parser.rs:100:9 [INFO] [stdout] | [INFO] [stdout] 100 | / sender_full [INFO] [stdout] 101 | | .split('!') [INFO] [stdout] 102 | | .collect::>() [INFO] [stdout] 103 | | .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] help: try [INFO] [stdout] | [INFO] [stdout] 100 ~ sender_full [INFO] [stdout] 101 + .split('!') [INFO] [stdout] 102 + .collect::>().first() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/task_manager.rs:12:65 [INFO] [stdout] | [INFO] [stdout] 12 | pub static TASKS_MANAGER: LazyLock = LazyLock::new(|| TaskManager::default()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `TaskManager::default` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/bot_commands.rs:15:64 [INFO] [stdout] | [INFO] [stdout] 15 | pub static BOT_COMMANDS: LazyLock = LazyLock::new(|| BotCommands::default()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `BotCommands::default` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/tts.rs:20:59 [INFO] [stdout] | [INFO] [stdout] 20 | pub static TTS_VOCE_BD: LazyLock = LazyLock::new(|| VoiceDB::default()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `VoiceDB::default` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/tts.rs:21:70 [INFO] [stdout] | [INFO] [stdout] 21 | pub static TTS_QUEUE: LazyLock> = LazyLock::new(|| MSGQueue::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `MSGQueue::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: iterating on a map's keys [INFO] [stdout] --> src/bot_commands.rs:82:20 [INFO] [stdout] | [INFO] [stdout] 82 | let triggers = BOT_COMMANDS [INFO] [stdout] | ____________________^ [INFO] [stdout] 83 | | .commands [INFO] [stdout] 84 | | .read() [INFO] [stdout] 85 | | .await [INFO] [stdout] 86 | | .iter() [INFO] [stdout] 87 | | .map(|(trigger, _)| format!("{}{}", BOT_COMMAND_PREFIX, trigger)) [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map [INFO] [stdout] = note: `#[warn(clippy::iter_kv_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 82 ~ let triggers = BOT_COMMANDS [INFO] [stdout] 83 + .commands [INFO] [stdout] 84 + .read() [INFO] [stdout] 85 + .await.keys().map(|trigger| format!("{}{}", BOT_COMMAND_PREFIX, trigger)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessarily eager cloning of iterator items [INFO] [stdout] --> src/tts.rs:97:26 [INFO] [stdout] | [INFO] [stdout] 97 | let voice_list = self [INFO] [stdout] | __________________________^ [INFO] [stdout] 98 | | .voice_list [INFO] [stdout] 99 | | .iter() [INFO] [stdout] 100 | | .cloned() [INFO] [stdout] ... | [INFO] [stdout] 105 | | .all(|f| v_text.to_lowercase().contains(f.to_lowercase().as_str())) [INFO] [stdout] 106 | | }) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned [INFO] [stdout] = note: `#[warn(clippy::iter_overeager_cloned)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 99 ~ .iter().filter(|&v| { [INFO] [stdout] 100 + let v_text = format! {"{:?}", v}; [INFO] [stdout] 101 + filter [INFO] [stdout] 102 + .iter() [INFO] [stdout] 103 + .all(|f| v_text.to_lowercase().contains(f.to_lowercase().as_str())) [INFO] [stdout] 104 + }).cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> src/tts.rs:112:17 [INFO] [stdout] | [INFO] [stdout] 112 | filter.as_ref() [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/bot_external_commands.rs:74:9 [INFO] [stdout] | [INFO] [stdout] 73 | let ret_val = block_on(ExternalBotCommands::load(CONFIG_DIR)); [INFO] [stdout] | -------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 74 | ret_val [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 73 ~ [INFO] [stdout] 74 ~ block_on(ExternalBotCommands::load(CONFIG_DIR)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/twitch_client.rs:19:69 [INFO] [stdout] | [INFO] [stdout] 19 | pub static TWITCH_BOT_INFO: LazyLock = LazyLock::new(|| TwitchBotInfo::init()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `TwitchBotInfo::init` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/twitch_client.rs:22:70 [INFO] [stdout] | [INFO] [stdout] 22 | pub static TWITCH_RECEIVER: LazyLock = LazyLock::new(|| TwitchReceiver::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `TwitchReceiver::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TwitchReceiver` [INFO] [stdout] --> src/twitch_client.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | / pub fn new() -> Self { [INFO] [stdout] 33 | | Self { [INFO] [stdout] 34 | | queue: RwLock::new(VecDeque::new()), [INFO] [stdout] 35 | | notify: Arc::new(tokio::sync::Notify::new()), [INFO] [stdout] 36 | | } [INFO] [stdout] 37 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 31 + impl Default for TwitchReceiver { [INFO] [stdout] 32 + fn default() -> Self { [INFO] [stdout] 33 + Self::new() [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/irc_parser.rs:84:5 [INFO] [stdout] | [INFO] [stdout] 78 | / let irc_message = IrcMessage::new( [INFO] [stdout] 79 | | parse_irc_message_token(token), [INFO] [stdout] 80 | | parse_irc_message_context(context), [INFO] [stdout] 81 | | payload, [INFO] [stdout] 82 | | ); [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 83 | [INFO] [stdout] 84 | irc_message [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 78 ~ [INFO] [stdout] 79 | [INFO] [stdout] 80 ~ IrcMessage::new( [INFO] [stdout] 81 + parse_irc_message_token(token), [INFO] [stdout] 82 + parse_irc_message_context(context), [INFO] [stdout] 83 + payload, [INFO] [stdout] 84 + ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `msg_arr.get(0)` [INFO] [stdout] --> src/irc_parser.rs:73:23 [INFO] [stdout] | [INFO] [stdout] 73 | context = msg_arr.get(0).unwrap_or(&"").trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `msg_arr.first()` [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] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `context_arr.get(0)` [INFO] [stdout] --> src/irc_parser.rs:95:23 [INFO] [stdout] | [INFO] [stdout] 95 | let sender_full = context_arr.get(0).unwrap_or(&"").trim(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `context_arr.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 `sender_full [INFO] [stdout] .split('!') [INFO] [stdout] .collect::>().get(0)` [INFO] [stdout] --> src/irc_parser.rs:100:9 [INFO] [stdout] | [INFO] [stdout] 100 | / sender_full [INFO] [stdout] 101 | | .split('!') [INFO] [stdout] 102 | | .collect::>() [INFO] [stdout] 103 | | .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] help: try [INFO] [stdout] | [INFO] [stdout] 100 ~ sender_full [INFO] [stdout] 101 + .split('!') [INFO] [stdout] 102 + .collect::>().first() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/task_manager.rs:12:65 [INFO] [stdout] | [INFO] [stdout] 12 | pub static TASKS_MANAGER: LazyLock = LazyLock::new(|| TaskManager::default()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `TaskManager::default` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/tts.rs:20:59 [INFO] [stdout] | [INFO] [stdout] 20 | pub static TTS_VOCE_BD: LazyLock = LazyLock::new(|| VoiceDB::default()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `VoiceDB::default` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/tts.rs:21:70 [INFO] [stdout] | [INFO] [stdout] 21 | pub static TTS_QUEUE: LazyLock> = LazyLock::new(|| MSGQueue::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `MSGQueue::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessarily eager cloning of iterator items [INFO] [stdout] --> src/tts.rs:97:26 [INFO] [stdout] | [INFO] [stdout] 97 | let voice_list = self [INFO] [stdout] | __________________________^ [INFO] [stdout] 98 | | .voice_list [INFO] [stdout] 99 | | .iter() [INFO] [stdout] 100 | | .cloned() [INFO] [stdout] ... | [INFO] [stdout] 105 | | .all(|f| v_text.to_lowercase().contains(f.to_lowercase().as_str())) [INFO] [stdout] 106 | | }) [INFO] [stdout] | |______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_overeager_cloned [INFO] [stdout] = note: `#[warn(clippy::iter_overeager_cloned)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 99 ~ .iter().filter(|&v| { [INFO] [stdout] 100 + let v_text = format! {"{:?}", v}; [INFO] [stdout] 101 + filter [INFO] [stdout] 102 + .iter() [INFO] [stdout] 103 + .all(|f| v_text.to_lowercase().contains(f.to_lowercase().as_str())) [INFO] [stdout] 104 + }).cloned() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> src/tts.rs:112:17 [INFO] [stdout] | [INFO] [stdout] 112 | filter.as_ref() [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `filter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] = note: `#[warn(clippy::useless_asref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/twitch_client.rs:19:69 [INFO] [stdout] | [INFO] [stdout] 19 | pub static TWITCH_BOT_INFO: LazyLock = LazyLock::new(|| TwitchBotInfo::init()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `TwitchBotInfo::init` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/twitch_client.rs:292:38 [INFO] [stdout] | [INFO] [stdout] 292 | let lines = text.split('\n').map(|line| parse_message(line)).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_message` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/twitch_client.rs:22:70 [INFO] [stdout] | [INFO] [stdout] 22 | pub static TWITCH_RECEIVER: LazyLock = LazyLock::new(|| TwitchReceiver::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `TwitchReceiver::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TwitchReceiver` [INFO] [stdout] --> src/twitch_client.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | / pub fn new() -> Self { [INFO] [stdout] 33 | | Self { [INFO] [stdout] 34 | | queue: RwLock::new(VecDeque::new()), [INFO] [stdout] 35 | | notify: Arc::new(tokio::sync::Notify::new()), [INFO] [stdout] 36 | | } [INFO] [stdout] 37 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 31 + impl Default for TwitchReceiver { [INFO] [stdout] 32 + fn default() -> Self { [INFO] [stdout] 33 + Self::new() [INFO] [stdout] 34 + } [INFO] [stdout] 35 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/twitch_client.rs:292:38 [INFO] [stdout] | [INFO] [stdout] 292 | let lines = text.split('\n').map(|line| parse_message(line)).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `parse_message` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 53s [INFO] running `Command { std: "docker" "inspect" "dc6daed9171b7e70d892554b503bed8dc104e0079e0a6d6ff2a22f836b21c405", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dc6daed9171b7e70d892554b503bed8dc104e0079e0a6d6ff2a22f836b21c405", kill_on_drop: false }` [INFO] [stdout] dc6daed9171b7e70d892554b503bed8dc104e0079e0a6d6ff2a22f836b21c405