[INFO] cloning repository https://github.com/Anti-Raid/khronos [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Anti-Raid/khronos" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAnti-Raid%2Fkhronos", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAnti-Raid%2Fkhronos'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 43d9a86f55396f457634c6e5f1fb76aa45819fbc [INFO] linting Anti-Raid/khronos against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAnti-Raid%2Fkhronos" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Anti-Raid/khronos [INFO] finished tweaking git repo https://github.com/Anti-Raid/khronos [INFO] tweaked toml for git repo https://github.com/Anti-Raid/khronos written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Anti-Raid/khronos 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/Anti-Raid/khronos 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/allan2/dotenvy` [INFO] [stderr] Updating git repository `https://github.com/Anti-Raid/serenity` [INFO] [stderr] Updating git repository `https://github.com/robinst/linkify` [INFO] [stderr] Updating git repository `https://github.com/mluau/scheduler` [INFO] [stderr] Updating git repository `https://github.com/mluau/mluau` [INFO] [stderr] Updating git repository `https://github.com/mluau/mluau-require` [INFO] [stderr] Updating git repository `https://github.com/Anti-Raid/rust-vfs` [INFO] [stderr] Updating git repository `https://github.com/mluau/luau-src-rs` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded to-arraystring v0.2.2 [INFO] [stderr] Downloaded typenum_mappings v0.1.0 [INFO] [stderr] Downloaded small-fixed-array v0.4.10 [INFO] [stderr] Downloaded bool_to_bitflags v0.1.3 [INFO] [stderr] Downloaded extract_map v0.3.1 [INFO] [stderr] Downloaded aformat-macros v0.1.6 [INFO] [stderr] Downloaded aformat v0.1.8 [INFO] [stderr] Downloaded instability v0.3.10 [INFO] [stderr] Downloaded phf_shared v0.12.1 [INFO] [stderr] Downloaded doc-comment v0.3.4 [INFO] [stderr] Downloaded safetensors v0.3.3 [INFO] [stderr] Downloaded phf v0.12.1 [INFO] [stderr] Downloaded ansi-to-tui v7.0.0 [INFO] [stderr] Downloaded comfy-table v7.2.1 [INFO] [stderr] Downloaded onig v6.5.1 [INFO] [stderr] Downloaded plist v1.8.0 [INFO] [stderr] Downloaded async-compression v0.4.40 [INFO] [stderr] Downloaded rustyline v15.0.0 [INFO] [stderr] Downloaded tui-textarea v0.7.0 [INFO] [stderr] Downloaded moka v0.12.12 [INFO] [stderr] Downloaded torch-sys v0.19.0 [INFO] [stderr] Downloaded rustrict v0.7.38 [INFO] [stderr] Downloaded onig_sys v69.9.1 [INFO] [stderr] Downloaded syntect v5.3.0 [INFO] [stderr] Downloaded chrono-tz v0.10.4 [INFO] [stderr] Downloaded tch v0.19.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] e1d534f7a8595274cf1101e85368fe7773f7c8d4afb699567cbdcd2d07bf01e8 [INFO] running `Command { std: "docker" "start" "-a" "e1d534f7a8595274cf1101e85368fe7773f7c8d4afb699567cbdcd2d07bf01e8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e1d534f7a8595274cf1101e85368fe7773f7c8d4afb699567cbdcd2d07bf01e8", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e1d534f7a8595274cf1101e85368fe7773f7c8d4afb699567cbdcd2d07bf01e8", kill_on_drop: false }` [INFO] [stdout] e1d534f7a8595274cf1101e85368fe7773f7c8d4afb699567cbdcd2d07bf01e8 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 57771597e4980168ec40090869e1d5a4102405211de9ab4d86fb2bfff1adeb70 [INFO] running `Command { std: "docker" "start" "-a" "57771597e4980168ec40090869e1d5a4102405211de9ab4d86fb2bfff1adeb70", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.180 [INFO] [stderr] Compiling find-msvc-tools v0.1.8 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling typenum v1.19.0 [INFO] [stderr] Compiling portable-atomic v1.13.0 [INFO] [stderr] Checking critical-section v1.2.0 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking bitflags v2.10.0 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Checking lock_api v0.4.14 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling thiserror v2.0.18 [INFO] [stderr] Compiling rustls v0.23.36 [INFO] [stderr] Compiling thiserror-impl v2.0.18 [INFO] [stderr] Compiling zmij v1.0.15 [INFO] [stderr] Compiling zerofrom v0.1.6 [INFO] [stderr] Checking rustls-pki-types v1.14.0 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Checking indexmap v2.13.0 [INFO] [stderr] Compiling yoke v0.8.1 [INFO] [stderr] Checking form_urlencoded v1.2.2 [INFO] [stderr] Compiling bytes v1.11.0 [INFO] [stderr] Compiling itoa v1.0.17 [INFO] [stderr] Compiling zerovec v0.11.5 [INFO] [stderr] Checking tinystr v0.8.2 [INFO] [stderr] Compiling generic-array v0.14.7 [INFO] [stderr] Checking zerotrie v0.2.3 [INFO] [stderr] Checking icu_collections v2.1.1 [INFO] [stderr] Checking icu_locale_core v2.1.1 [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Checking webpki-roots v1.0.5 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Compiling potential_utf v0.1.4 [INFO] [stderr] Checking ryu v1.0.22 [INFO] [stderr] Compiling darling_core v0.20.11 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Compiling block-buffer v0.10.4 [INFO] [stderr] Compiling crypto-common v0.1.7 [INFO] [stderr] Compiling digest v0.10.7 [INFO] [stderr] Checking concurrent-queue v2.5.0 [INFO] [stderr] Checking tracing v0.1.44 [INFO] [stderr] Compiling typeid v1.0.3 [INFO] [stderr] Compiling jobserver v0.1.34 [INFO] [stderr] Checking icu_provider v2.1.1 [INFO] [stderr] Compiling getrandom v0.2.17 [INFO] [stderr] Compiling sha2 v0.10.9 [INFO] [stderr] Compiling crossbeam-utils v0.8.21 [INFO] [stderr] Checking chrono v0.4.43 [INFO] [stderr] Checking mio v1.1.1 [INFO] [stderr] Checking socket2 v0.6.1 [INFO] [stderr] Compiling cc v1.2.53 [INFO] [stderr] Checking parking_lot_core v0.9.12 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking getrandom v0.3.4 [INFO] [stderr] Checking icu_properties v2.1.2 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking rand_core v0.9.5 [INFO] [stderr] Checking event-listener v5.4.1 [INFO] [stderr] Checking webpki-roots v0.26.11 [INFO] [stderr] Compiling icu_properties_data v2.1.2 [INFO] [stderr] Checking tokio v1.49.0 [INFO] [stderr] Compiling openssl v0.10.75 [INFO] [stderr] Compiling erased-serde v0.4.9 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking ordered-float v2.10.1 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Compiling rustix v1.1.3 [INFO] [stderr] Checking serde-value v0.7.0 [INFO] [stderr] Checking uuid v1.19.0 [INFO] [stderr] Compiling luau0-src v0.17.1+luau702 (https://github.com/mluau/luau-src-rs#bedf2b8e) [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Compiling zerocopy v0.8.33 [INFO] [stderr] Checking linux-raw-sys v0.11.0 [INFO] [stderr] Compiling arrayvec v0.7.6 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Checking data-encoding v2.10.0 [INFO] [stderr] Compiling option-ext v0.2.0 [INFO] [stderr] Compiling unicase v2.9.0 [INFO] [stderr] Checking deranged v0.5.5 [INFO] [stderr] Compiling dirs-sys v0.5.0 [INFO] [stderr] Checking bstr v1.12.1 [INFO] [stderr] Checking url v2.5.8 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling openssl-sys v0.9.111 [INFO] [stderr] Compiling mlua-sys v0.9.0 (https://github.com/mluau/mluau#ab5c3581) [INFO] [stderr] Compiling mime_guess v2.0.5 [INFO] [stderr] Compiling to-arraystring v0.2.2 [INFO] [stderr] Compiling darling_macro v0.20.11 [INFO] [stderr] Compiling darling v0.20.11 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Compiling log v0.4.29 [INFO] [stderr] Compiling iana-time-zone v0.1.64 [INFO] [stderr] Compiling same-file v1.0.6 [INFO] [stderr] Checking time-core v0.1.7 [INFO] [stderr] Compiling hashbrown v0.16.1 [INFO] [stderr] Compiling crc v3.4.0 [INFO] [stderr] Compiling walkdir v2.5.0 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Compiling futures-intrusive v0.5.0 [INFO] [stderr] Compiling dirs v6.0.0 [INFO] [stderr] Compiling crossbeam-queue v0.3.12 [INFO] [stderr] Compiling ppv-lite86 v0.2.21 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking errno v0.3.14 [INFO] [stderr] Compiling hmac v0.12.1 [INFO] [stderr] Checking http-body-util v0.1.3 [INFO] [stderr] Compiling bytestring v1.5.0 [INFO] [stderr] Checking iri-string v0.7.10 [INFO] [stderr] Compiling doc-comment v0.3.4 [INFO] [stderr] Checking simd-adler32 v0.3.8 [INFO] [stderr] Compiling ref-cast v1.0.25 [INFO] [stderr] Checking time v0.3.45 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Compiling aformat-macros v0.1.6 [INFO] [stderr] Compiling hkdf v0.12.4 [INFO] [stderr] Checking signal-hook-registry v1.4.8 [INFO] [stderr] Compiling shellexpand v3.1.1 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking crc32fast v1.5.0 [INFO] [stderr] Compiling rust-embed-utils v8.11.0 [INFO] [stderr] Compiling typenum_mappings v0.1.0 [INFO] [stderr] Compiling atoi v2.0.0 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Checking inout v0.1.4 [INFO] [stderr] Compiling md-5 v0.10.6 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking tokio-util v0.7.18 [INFO] [stderr] Checking tower v0.5.3 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Compiling ref-cast-impl v1.0.25 [INFO] [stderr] Compiling serenity v0.12.4 (https://github.com/Anti-Raid/serenity?branch=next#df55dd22) [INFO] [stderr] Checking flate2 v1.1.8 [INFO] [stderr] Checking aformat v0.1.8 [INFO] [stderr] Checking tokio-stream v0.1.18 [INFO] [stderr] Checking cipher v0.4.4 [INFO] [stderr] Compiling rust-embed-impl v8.11.0 [INFO] [stderr] Checking signal-hook v0.3.18 [INFO] [stderr] Checking dashmap v6.1.0 [INFO] [stderr] Compiling bool_to_bitflags v0.1.3 [INFO] [stderr] Checking event-listener-strategy v0.5.4 [INFO] [stderr] Checking h2 v0.4.13 [INFO] [stderr] Checking tower-http v0.6.8 [INFO] [stderr] Checking universal-hash v0.5.1 [INFO] [stderr] Checking filetime v0.2.27 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Checking serde_cow v0.1.2 [INFO] [stderr] Checking nonmax v0.5.5 [INFO] [stderr] Checking small-fixed-array v0.4.10 [INFO] [stderr] Checking extract_map v0.3.1 [INFO] [stderr] Checking finl_unicode v1.4.0 [INFO] [stderr] Compiling instability v0.3.10 [INFO] [stderr] Checking strsim v0.10.0 [INFO] [stderr] Checking phf_shared v0.12.1 [INFO] [stderr] Checking polyval v0.6.2 [INFO] [stderr] Checking rustix v0.38.44 [INFO] [stderr] Checking signal-hook-mio v0.2.5 [INFO] [stderr] Checking async-lock v3.4.2 [INFO] [stderr] Checking brotli v8.0.2 [INFO] [stderr] Compiling onig_sys v69.9.1 [INFO] [stderr] Checking itertools v0.13.0 [INFO] [stderr] Checking rust-embed v8.11.0 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Compiling enum-as-inner v0.6.1 [INFO] [stderr] Checking raw-cpuid v11.6.0 [INFO] [stderr] Checking crossbeam-epoch v0.9.18 [INFO] [stderr] Checking linkify v0.10.0 (https://github.com/robinst/linkify#5239e12e) [INFO] [stderr] Compiling chrono-tz v0.10.4 [INFO] [stderr] Checking compression-core v0.4.31 [INFO] [stderr] Checking base64ct v1.8.3 [INFO] [stderr] Checking byteorder v1.5.0 [INFO] [stderr] Checking rustrict v0.7.38 [INFO] [stderr] Checking tagptr v0.2.0 [INFO] [stderr] Compiling indoc v2.0.7 [INFO] [stderr] Checking whoami v1.6.1 [INFO] [stderr] Checking anstream v0.6.21 [INFO] [stderr] Checking moka v0.12.12 [INFO] [stderr] Checking password-hash v0.5.0 [INFO] [stderr] Checking rustls-webpki v0.103.9 [INFO] [stderr] Compiling nix v0.29.0 [INFO] [stderr] Checking crossterm v0.28.1 [INFO] [stderr] Checking hickory-proto v0.25.2 [INFO] [stderr] Checking compact_str v0.8.1 [INFO] [stderr] Checking quanta v0.12.6 [INFO] [stderr] Checking unicode-truncate v1.1.0 [INFO] [stderr] Checking vfs v0.12.1 (https://github.com/Anti-Raid/rust-vfs#7149e377) [INFO] [stderr] Checking ghash v0.5.1 [INFO] [stderr] Checking phf v0.12.1 [INFO] [stderr] Checking aes v0.8.4 [INFO] [stderr] Checking ctr v0.9.2 [INFO] [stderr] Checking xattr v1.6.1 [INFO] [stderr] Checking dashmap v5.5.3 [INFO] [stderr] Checking blake2 v0.10.6 [INFO] [stderr] Checking aead v0.5.2 [INFO] [stderr] Checking spinning_top v0.3.0 [INFO] [stderr] Compiling litrs v1.0.0 [INFO] [stderr] Checking resolv-conf v0.7.6 [INFO] [stderr] Checking governor v0.6.3 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking aes-gcm v0.10.3 [INFO] [stderr] Checking argon2 v0.5.3 [INFO] [stderr] Checking tar v0.4.44 [INFO] [stderr] Checking compression-codecs v0.4.37 [INFO] [stderr] Checking nibble_vec v0.1.0 [INFO] [stderr] Checking async-compression v0.4.40 [INFO] [stderr] Checking quick-xml v0.38.4 [INFO] [stderr] Checking clap_lex v0.7.7 [INFO] [stderr] Checking endian-type v0.1.2 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Checking linked-hash-map v0.5.6 [INFO] [stderr] Checking clap_builder v4.5.54 [INFO] [stderr] Checking radix_trie v0.2.1 [INFO] [stderr] Checking yaml-rust v0.4.5 [INFO] [stderr] Checking ratatui v0.29.0 [INFO] [stderr] Compiling document-features v0.2.12 [INFO] [stderr] Checking env_filter v0.1.4 [INFO] [stderr] Checking fd-lock v4.0.4 [INFO] [stderr] Checking plist v1.8.0 [INFO] [stderr] Checking console v0.15.11 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Checking crossterm v0.29.0 [INFO] [stderr] Checking unicode-linebreak v0.1.5 [INFO] [stderr] Checking smawk v0.3.2 [INFO] [stderr] Checking simdutf8 v0.1.5 [INFO] [stderr] Checking indicatif v0.17.11 [INFO] [stderr] Checking comfy-table v7.2.1 [INFO] [stderr] Checking env_logger v0.11.8 [INFO] [stderr] Checking dotenvy v0.15.7 (https://github.com/allan2/dotenvy#86c0d6dd) [INFO] [stderr] Checking textwrap v0.16.2 [INFO] [stderr] Checking hyper v1.8.1 [INFO] [stderr] Checking onig v6.5.1 [INFO] [stderr] Checking rustyline v15.0.0 [INFO] [stderr] Checking hickory-resolver v0.25.2 [INFO] [stderr] Checking tokio-rustls v0.26.4 [INFO] [stderr] Checking tungstenite v0.26.2 [INFO] [stderr] Checking sqlx-core v0.8.6 [INFO] [stderr] Checking clap v4.5.54 [INFO] [stderr] Checking syntect v5.3.0 [INFO] [stderr] Checking ansi-to-tui v7.0.0 [INFO] [stderr] Checking tui-textarea v0.7.0 [INFO] [stderr] Checking hyper-util v0.1.19 [INFO] [stderr] Checking tokio-tungstenite v0.26.2 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking hyper-rustls v0.27.7 [INFO] [stderr] Checking reqwest v0.12.28 [INFO] [stderr] Checking sqlx-postgres v0.8.6 [INFO] [stderr] Compiling sqlx-macros-core v0.8.6 [INFO] [stderr] Compiling sqlx-macros v0.8.6 [INFO] [stderr] Checking sqlx v0.8.6 [INFO] [stderr] Checking mluau v0.11.5 (https://github.com/mluau/mluau#ab5c3581) [INFO] [stderr] Checking mlua_scheduler v1.0.0 (https://github.com/mluau/scheduler#585795be) [INFO] [stderr] Checking mluau-require v0.1.0 (https://github.com/mluau/mluau-require#afb9efcc) [INFO] [stderr] Checking dapi v1.0.0 (/opt/rustwide/workdir/crates/dapi) [INFO] [stderr] Checking khronos_ext v1.0.0 (/opt/rustwide/workdir/crates/ext) [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> crates/ext/src/db.rs:110:29 [INFO] [stdout] | [INFO] [stdout] 110 | pub fn into_lua(&self, lua: &Lua) -> LuaResult { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 238 | / db_plugin! { [INFO] [stdout] 239 | | i32 => { I32, I32Opt, I32List, "i32", |lua, value| { lua.from_value(value) }, |lua, opaque| { lua.to_value(opaque) } }, [INFO] [stdout] 240 | | i64 => { I64, I64Opt, I64List, "i64", |lua, value| { lua.from_value(value) }, |lua, opaque| { lua.to_value(&opaque) } }, [INFO] [stdout] 241 | | String => { String, StringOpt, StringList, "string", |lua, value| { lua.from_value(value) }, |lua, opaque| { lua.to_value... [INFO] [stdout] 242 | | bool => { Bool, BoolOpt, BoolList, "boolean", |lua, value| { lua.from_value(value) }, |_lua, opaque| { Ok::<_, LuaError>(... [INFO] [stdout] 243 | | f64 => { F64, F64Opt, F64List, "f64", |lua, value| { lua.from_value(value) }, |lua, opaque| { lua.to_value(opaque) } }, [INFO] [stdout] 244 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] = note: this warning originates in the macro `db_plugin` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> crates/ext/src/db.rs:110:29 [INFO] [stdout] | [INFO] [stdout] 110 | pub fn into_lua(&self, lua: &Lua) -> LuaResult { [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 238 | / db_plugin! { [INFO] [stdout] 239 | | i32 => { I32, I32Opt, I32List, "i32", |lua, value| { lua.from_value(value) }, |lua, opaque| { lua.to_value(opaque) } }, [INFO] [stdout] 240 | | i64 => { I64, I64Opt, I64List, "i64", |lua, value| { lua.from_value(value) }, |lua, opaque| { lua.to_value(&opaque) } }, [INFO] [stdout] 241 | | String => { String, StringOpt, StringList, "string", |lua, value| { lua.from_value(value) }, |lua, opaque| { lua.to_value... [INFO] [stdout] 242 | | bool => { Bool, BoolOpt, BoolList, "boolean", |lua, value| { lua.from_value(value) }, |_lua, opaque| { Ok::<_, LuaError>(... [INFO] [stdout] 243 | | f64 => { F64, F64Opt, F64List, "f64", |lua, value| { lua.from_value(value) }, |lua, opaque| { lua.to_value(opaque) } }, [INFO] [stdout] 244 | | } [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] = note: this warning originates in the macro `db_plugin` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `u32` [INFO] [stdout] --> crates/dapi/src/controller.rs:516:17 [INFO] [stdout] | [INFO] [stdout] 516 | / (delete_message_seconds / 86400) [INFO] [stdout] 517 | | .try_into() [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [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: `u32` [INFO] [stdout] --> crates/dapi/src/controller.rs:516:17 [INFO] [stdout] | [INFO] [stdout] 516 | / (delete_message_seconds / 86400) [INFO] [stdout] 517 | | .try_into() [INFO] [stdout] | |_______________________________^ [INFO] [stdout] | [INFO] [stdout] = help: consider removing `.try_into()` [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: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/types/auto_moderation.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | / if let Some(ref exempt_roles) = self.exempt_roles { [INFO] [stdout] 27 | | if exempt_roles.len() > 20 { [INFO] [stdout] 28 | | return Err("A maximum of 20 exempt_roles can be provided".into()); [INFO] [stdout] 29 | | } [INFO] [stdout] 30 | | } [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] 26 ~ if let Some(ref exempt_roles) = self.exempt_roles [INFO] [stdout] 27 ~ && exempt_roles.len() > 20 { [INFO] [stdout] 28 | return Err("A maximum of 20 exempt_roles can be provided".into()); [INFO] [stdout] 29 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/types/auto_moderation.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | / if let Some(ref exempt_channels) = self.exempt_channels { [INFO] [stdout] 33 | | if exempt_channels.len() > 20 { [INFO] [stdout] 34 | | return Err("A maximum of 20 exempt_channels can be provided".into()); [INFO] [stdout] 35 | | } [INFO] [stdout] 36 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 32 ~ if let Some(ref exempt_channels) = self.exempt_channels [INFO] [stdout] 33 ~ && exempt_channels.len() > 20 { [INFO] [stdout] 34 | return Err("A maximum of 20 exempt_channels can be provided".into()); [INFO] [stdout] 35 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/types/auto_moderation.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | / if let Some(ref exempt_roles) = self.exempt_roles { [INFO] [stdout] 84 | | if exempt_roles.len() > 20 { [INFO] [stdout] 85 | | return Err("A maximum of 20 exempt_roles can be provided".into()); [INFO] [stdout] 86 | | } [INFO] [stdout] 87 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 83 ~ if let Some(ref exempt_roles) = self.exempt_roles [INFO] [stdout] 84 ~ && exempt_roles.len() > 20 { [INFO] [stdout] 85 | return Err("A maximum of 20 exempt_roles can be provided".into()); [INFO] [stdout] 86 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/types/auto_moderation.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | / if let Some(ref exempt_channels) = self.exempt_channels { [INFO] [stdout] 90 | | if exempt_channels.len() > 20 { [INFO] [stdout] 91 | | return Err("A maximum of 20 exempt_channels can be provided".into()); [INFO] [stdout] 92 | | } [INFO] [stdout] 93 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 89 ~ if let Some(ref exempt_channels) = self.exempt_channels [INFO] [stdout] 90 ~ && exempt_channels.len() > 20 { [INFO] [stdout] 91 | return Err("A maximum of 20 exempt_channels can be provided".into()); [INFO] [stdout] 92 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/types/auto_moderation.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | / if let Some(ref exempt_roles) = self.exempt_roles { [INFO] [stdout] 27 | | if exempt_roles.len() > 20 { [INFO] [stdout] 28 | | return Err("A maximum of 20 exempt_roles can be provided".into()); [INFO] [stdout] 29 | | } [INFO] [stdout] 30 | | } [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] 26 ~ if let Some(ref exempt_roles) = self.exempt_roles [INFO] [stdout] 27 ~ && exempt_roles.len() > 20 { [INFO] [stdout] 28 | return Err("A maximum of 20 exempt_roles can be provided".into()); [INFO] [stdout] 29 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/types/auto_moderation.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | / if let Some(ref exempt_channels) = self.exempt_channels { [INFO] [stdout] 33 | | if exempt_channels.len() > 20 { [INFO] [stdout] 34 | | return Err("A maximum of 20 exempt_channels can be provided".into()); [INFO] [stdout] 35 | | } [INFO] [stdout] 36 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 32 ~ if let Some(ref exempt_channels) = self.exempt_channels [INFO] [stdout] 33 ~ && exempt_channels.len() > 20 { [INFO] [stdout] 34 | return Err("A maximum of 20 exempt_channels can be provided".into()); [INFO] [stdout] 35 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/types/auto_moderation.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | / if let Some(ref exempt_roles) = self.exempt_roles { [INFO] [stdout] 84 | | if exempt_roles.len() > 20 { [INFO] [stdout] 85 | | return Err("A maximum of 20 exempt_roles can be provided".into()); [INFO] [stdout] 86 | | } [INFO] [stdout] 87 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 83 ~ if let Some(ref exempt_roles) = self.exempt_roles [INFO] [stdout] 84 ~ && exempt_roles.len() > 20 { [INFO] [stdout] 85 | return Err("A maximum of 20 exempt_roles can be provided".into()); [INFO] [stdout] 86 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/types/auto_moderation.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | / if let Some(ref exempt_channels) = self.exempt_channels { [INFO] [stdout] 90 | | if exempt_channels.len() > 20 { [INFO] [stdout] 91 | | return Err("A maximum of 20 exempt_channels can be provided".into()); [INFO] [stdout] 92 | | } [INFO] [stdout] 93 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 89 ~ if let Some(ref exempt_channels) = self.exempt_channels [INFO] [stdout] 90 ~ && exempt_channels.len() > 20 { [INFO] [stdout] 91 | return Err("A maximum of 20 exempt_channels can be provided".into()); [INFO] [stdout] 92 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/dapi/src/types/webhook.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | return Err("Not yet implemented".into()); [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] 67 - return Err("Not yet implemented".into()); [INFO] [stdout] 67 + Err("Not yet implemented".into()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/channels/edit_channel.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | / if let Some(ref topic) = self.data.topic { [INFO] [stdout] 45 | | if topic.len() > 1024 { [INFO] [stdout] 46 | | return Err("Topic must be less than 1024 characters".into()); [INFO] [stdout] 47 | | } [INFO] [stdout] 48 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 44 ~ if let Some(ref topic) = self.data.topic [INFO] [stdout] 45 ~ && topic.len() > 1024 { [INFO] [stdout] 46 | return Err("Topic must be less than 1024 characters".into()); [INFO] [stdout] 47 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/channels/edit_channel.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | / if let Some(ref rate_limit_per_user) = self.data.rate_limit_per_user { [INFO] [stdout] 51 | | if rate_limit_per_user.get() > 21600 { [INFO] [stdout] 52 | | return Err( [INFO] [stdout] 53 | | "Rate limit per user must be less than 21600 seconds".into(), [INFO] [stdout] ... | [INFO] [stdout] 56 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 50 ~ if let Some(ref rate_limit_per_user) = self.data.rate_limit_per_user [INFO] [stdout] 51 ~ && rate_limit_per_user.get() > 21600 { [INFO] [stdout] 52 | return Err( [INFO] [stdout] 53 | "Rate limit per user must be less than 21600 seconds".into(), [INFO] [stdout] 54 | ); [INFO] [stdout] 55 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/channels/edit_channel.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | / if let Some(ref default_thread_rate_limit_per_user) = [INFO] [stdout] 92 | | self.data.default_thread_rate_limit_per_user [INFO] [stdout] 93 | | { [INFO] [stdout] 94 | | if default_thread_rate_limit_per_user.get() > 21600 { [INFO] [stdout] ... | [INFO] [stdout] 99 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 92 ~ self.data.default_thread_rate_limit_per_user [INFO] [stdout] 93 ~ && default_thread_rate_limit_per_user.get() > 21600 { [INFO] [stdout] 94 | return Err( [INFO] [stdout] 95 | "Default thread rate limit per user must be less than 21600 seconds".into() [INFO] [stdout] 96 | ); [INFO] [stdout] 97 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / if let Some(ref name) = self.data.name { [INFO] [stdout] 20 | | if name.len() < 2 || name.len() > 100 { [INFO] [stdout] 21 | | return Err( [INFO] [stdout] 22 | | "Name must be between 2 and 100 characters".into(), [INFO] [stdout] ... | [INFO] [stdout] 25 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 19 ~ if let Some(ref name) = self.data.name [INFO] [stdout] 20 ~ && (name.len() < 2 || name.len() > 100) { [INFO] [stdout] 21 | return Err( [INFO] [stdout] 22 | "Name must be between 2 and 100 characters".into(), [INFO] [stdout] 23 | ); [INFO] [stdout] 24 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | / if let Some(ref description) = self.data.description { [INFO] [stdout] 28 | | if description.len() > 300 { [INFO] [stdout] 29 | | return Err( [INFO] [stdout] 30 | | "Description must be less than 300 characters".into(), [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 27 ~ if let Some(ref description) = self.data.description [INFO] [stdout] 28 ~ && description.len() > 300 { [INFO] [stdout] 29 | return Err( [INFO] [stdout] 30 | "Description must be less than 300 characters".into(), [INFO] [stdout] 31 | ); [INFO] [stdout] 32 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild.rs:118:9 [INFO] [stdout] | [INFO] [stdout] 118 | / if let Some(ref features) = self.data.features { [INFO] [stdout] 119 | | if ( [INFO] [stdout] 120 | | (features.contains(&"COMMUNITY".into()) && !guild_has_community) || [INFO] [stdout] 121 | | (!features.contains(&"COMMUNITY".into()) && guild_has_community) [INFO] [stdout] ... | [INFO] [stdout] 125 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 118 ~ if let Some(ref features) = self.data.features [INFO] [stdout] 119 ~ && ( [INFO] [stdout] 120 | (features.contains(&"COMMUNITY".into()) && !guild_has_community) || [INFO] [stdout] ... [INFO] [stdout] 123 | return Err("Enabling/disabling the community feature requires the bot to have the Administrator permission".into()); [INFO] [stdout] 124 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/create_guild_channel.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | / if let Some(ref topic) = self.data.topic { [INFO] [stdout] 24 | | if topic.len() > 1024 { [INFO] [stdout] 25 | | return Err("Topic must be less than 1024 characters".into()); [INFO] [stdout] 26 | | } [INFO] [stdout] 27 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 23 ~ if let Some(ref topic) = self.data.topic [INFO] [stdout] 24 ~ && topic.len() > 1024 { [INFO] [stdout] 25 | return Err("Topic must be less than 1024 characters".into()); [INFO] [stdout] 26 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/create_guild_channel.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | / if let Some(ref rate_limit_per_user) = self.data.rate_limit_per_user { [INFO] [stdout] 30 | | if rate_limit_per_user.get() > 21600 { [INFO] [stdout] 31 | | return Err("Rate limit per user must be less than 21600 seconds".into()); [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 29 ~ if let Some(ref rate_limit_per_user) = self.data.rate_limit_per_user [INFO] [stdout] 30 ~ && rate_limit_per_user.get() > 21600 { [INFO] [stdout] 31 | return Err("Rate limit per user must be less than 21600 seconds".into()); [INFO] [stdout] 32 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/create_guild_channel.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | / if let Some(ref default_thread_rate_limit_per_user) = [INFO] [stdout] 63 | | self.data.default_thread_rate_limit_per_user [INFO] [stdout] 64 | | { [INFO] [stdout] 65 | | if default_thread_rate_limit_per_user.get() > 21600 { [INFO] [stdout] ... | [INFO] [stdout] 68 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 63 ~ self.data.default_thread_rate_limit_per_user [INFO] [stdout] 64 ~ && default_thread_rate_limit_per_user.get() > 21600 { [INFO] [stdout] 65 | return Err("Default thread rate limit per user must be less than 21600 seconds".into()); [INFO] [stdout] 66 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/list_guild_members.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | / if let Some(limit) = self.limit { [INFO] [stdout] 14 | | if limit.get() > 1000 { [INFO] [stdout] 15 | | return Err("The maximum `limit` for get_guild_members is 1000".into()); [INFO] [stdout] 16 | | } [INFO] [stdout] 17 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 13 ~ if let Some(limit) = self.limit [INFO] [stdout] 14 ~ && limit.get() > 1000 { [INFO] [stdout] 15 | return Err("The maximum `limit` for get_guild_members is 1000".into()); [INFO] [stdout] 16 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/search_guild_members.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | / if let Some(limit) = self.limit { [INFO] [stdout] 14 | | if limit.get() > 1000 { [INFO] [stdout] 15 | | return Err("The maximum `limit` for get_guild_members is 1000".into()); [INFO] [stdout] 16 | | } [INFO] [stdout] 17 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 13 ~ if let Some(limit) = self.limit [INFO] [stdout] 14 ~ && limit.get() > 1000 { [INFO] [stdout] 15 | return Err("The maximum `limit` for get_guild_members is 1000".into()); [INFO] [stdout] 16 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_member.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | / if let Some(mute) = self.data.mute { [INFO] [stdout] 48 | | if mute { [INFO] [stdout] 49 | | needed_perms |= Permissions::MUTE_MEMBERS; [INFO] [stdout] 50 | | } [INFO] [stdout] 51 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 47 ~ if let Some(mute) = self.data.mute [INFO] [stdout] 48 ~ && mute { [INFO] [stdout] 49 | needed_perms |= Permissions::MUTE_MEMBERS; [INFO] [stdout] 50 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_member.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | / if let Some(deaf) = self.data.deaf { [INFO] [stdout] 54 | | if deaf { [INFO] [stdout] 55 | | needed_perms |= Permissions::DEAFEN_MEMBERS; [INFO] [stdout] 56 | | } [INFO] [stdout] 57 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 53 ~ if let Some(deaf) = self.data.deaf [INFO] [stdout] 54 ~ && deaf { [INFO] [stdout] 55 | needed_perms |= Permissions::DEAFEN_MEMBERS; [INFO] [stdout] 56 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_member.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | / if let Some(crdu) = communication_disabled_until { [INFO] [stdout] 65 | | if crdu > (chrono::Utc::now() + chrono::Duration::days(28) + chrono::Duration::seconds(10)) { [INFO] [stdout] 66 | | return Err("Communication disabled until must be less than 28 days in the future".into()); [INFO] [stdout] 67 | | } [INFO] [stdout] 68 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 64 ~ if let Some(crdu) = communication_disabled_until [INFO] [stdout] 65 ~ && crdu > (chrono::Utc::now() + chrono::Duration::days(28) + chrono::Duration::seconds(10)) { [INFO] [stdout] 66 | return Err("Communication disabled until must be less than 28 days in the future".into()); [INFO] [stdout] 67 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_member.rs:98:32 [INFO] [stdout] | [INFO] [stdout] 98 | let bot_highest_role = highest_role(&guild, &member) [INFO] [stdout] | ________________________________^ [INFO] [stdout] 99 | | .ok_or_else(|| "Bot does not have a role")?; [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 99 - .ok_or_else(|| "Bot does not have a role")?; [INFO] [stdout] 99 + .ok_or("Bot does not have a role")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/get_guild_bans.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | / if let Some(limit) = self.limit { [INFO] [stdout] 30 | | if limit.get() > 1000 { [INFO] [stdout] 31 | | return Err("Limit must be less than 1000".into()); [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 29 ~ if let Some(limit) = self.limit [INFO] [stdout] 30 ~ && limit.get() > 1000 { [INFO] [stdout] 31 | return Err("Limit must be less than 1000".into()); [INFO] [stdout] 32 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/create_guild_role.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | / if let Some(ref name) = self.data.name { [INFO] [stdout] 17 | | if name.len() > 100 || name.is_empty() { [INFO] [stdout] 18 | | return Err("Role name must be a maximum of 100 characters and not empty".into()); [INFO] [stdout] 19 | | } [INFO] [stdout] 20 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 16 ~ if let Some(ref name) = self.data.name [INFO] [stdout] 17 ~ && (name.len() > 100 || name.is_empty()) { [INFO] [stdout] 18 | return Err("Role name must be a maximum of 100 characters and not empty".into()); [INFO] [stdout] 19 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/create_guild_role.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | / if let Some(permissions) = self.data.permissions { [INFO] [stdout] 40 | | if !bot_perms.contains(permissions) { [INFO] [stdout] 41 | | return Err(format!("Bot does not have permissions: {:?}", permissions.difference(bot_perms)).into()); [INFO] [stdout] 42 | | } [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 39 ~ if let Some(permissions) = self.data.permissions [INFO] [stdout] 40 ~ && !bot_perms.contains(permissions) { [INFO] [stdout] 41 | return Err(format!("Bot does not have permissions: {:?}", permissions.difference(bot_perms)).into()); [INFO] [stdout] 42 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/dapi/src/types/webhook.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | return Err("Not yet implemented".into()); [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] 67 - return Err("Not yet implemented".into()); [INFO] [stdout] 67 + Err("Not yet implemented".into()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_role_positions.rs:24:32 [INFO] [stdout] | [INFO] [stdout] 24 | let bot_highest_role = highest_role(&guild, &member) [INFO] [stdout] | ________________________________^ [INFO] [stdout] 25 | | .ok_or_else(|| "Bot does not have a role")?; [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 25 - .ok_or_else(|| "Bot does not have a role")?; [INFO] [stdout] 25 + .ok_or("Bot does not have a role")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_role.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | / if let Some(ref name) = self.data.name { [INFO] [stdout] 18 | | if name.len() > 100 || name.is_empty() { [INFO] [stdout] 19 | | return Err("Role name must be a maximum of 100 characters and not empty".into()); [INFO] [stdout] 20 | | } [INFO] [stdout] 21 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 17 ~ if let Some(ref name) = self.data.name [INFO] [stdout] 18 ~ && (name.len() > 100 || name.is_empty()) { [INFO] [stdout] 19 | return Err("Role name must be a maximum of 100 characters and not empty".into()); [INFO] [stdout] 20 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_role.rs:33:32 [INFO] [stdout] | [INFO] [stdout] 33 | let bot_highest_role = highest_role(&guild, &member) [INFO] [stdout] | ________________________________^ [INFO] [stdout] 34 | | .ok_or_else(|| "The bot must have roles in order to modify a guild role")?; [INFO] [stdout] | |_____________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 34 - .ok_or_else(|| "The bot must have roles in order to modify a guild role")?; [INFO] [stdout] 34 + .ok_or("The bot must have roles in order to modify a guild role")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_role.rs:36:24 [INFO] [stdout] | [INFO] [stdout] 36 | let mod_role = guild.roles.get(&self.role_id) [INFO] [stdout] | ________________________^ [INFO] [stdout] 37 | | .ok_or_else(|| "The role being modified could not be found on the server")?; [INFO] [stdout] | |______________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 37 - .ok_or_else(|| "The role being modified could not be found on the server")?; [INFO] [stdout] 37 + .ok_or("The role being modified could not be found on the server")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_role.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | / if let Some(permissions) = self.data.permissions { [INFO] [stdout] 51 | | if !bot_perms.contains(permissions) { [INFO] [stdout] 52 | | return Err(format!("Bot does not have permissions: {:?}", permissions.difference(bot_perms)).into()); [INFO] [stdout] 53 | | } [INFO] [stdout] 54 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 50 ~ if let Some(permissions) = self.data.permissions [INFO] [stdout] 51 ~ && !bot_perms.contains(permissions) { [INFO] [stdout] 52 | return Err(format!("Bot does not have permissions: {:?}", permissions.difference(bot_perms)).into()); [INFO] [stdout] 53 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/dapi/src/api/guilds/delete_guild_role.rs:30:32 [INFO] [stdout] | [INFO] [stdout] 30 | let bot_highest_role = highest_role(&guild, &member) [INFO] [stdout] | ________________________________^ [INFO] [stdout] 31 | | .ok_or_else(|| "The bot must have roles in order to modify a guild role")?; [INFO] [stdout] | |_____________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 31 - .ok_or_else(|| "The bot must have roles in order to modify a guild role")?; [INFO] [stdout] 31 + .ok_or("The bot must have roles in order to modify a guild role")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/dapi/src/api/guilds/delete_guild_role.rs:33:24 [INFO] [stdout] | [INFO] [stdout] 33 | let mod_role = guild.roles.get(&self.role_id) [INFO] [stdout] | ________________________^ [INFO] [stdout] 34 | | .ok_or_else(|| "The role being modified could not be found on the server")?; [INFO] [stdout] | |______________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 34 - .ok_or_else(|| "The role being modified could not be found on the server")?; [INFO] [stdout] 34 + .ok_or("The role being modified could not be found on the server")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> crates/dapi/src/api/webhooks/modify_webhook.rs:17:21 [INFO] [stdout] | [INFO] [stdout] 17 | if let Some(ref avatar) = self.data.avatar.as_inner_ref() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 17 - if let Some(ref avatar) = self.data.avatar.as_inner_ref() { [INFO] [stdout] 17 + if let Some(avatar) = self.data.avatar.as_inner_ref() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/channels/edit_channel.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | / if let Some(ref topic) = self.data.topic { [INFO] [stdout] 45 | | if topic.len() > 1024 { [INFO] [stdout] 46 | | return Err("Topic must be less than 1024 characters".into()); [INFO] [stdout] 47 | | } [INFO] [stdout] 48 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 44 ~ if let Some(ref topic) = self.data.topic [INFO] [stdout] 45 ~ && topic.len() > 1024 { [INFO] [stdout] 46 | return Err("Topic must be less than 1024 characters".into()); [INFO] [stdout] 47 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/channels/edit_channel.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | / if let Some(ref rate_limit_per_user) = self.data.rate_limit_per_user { [INFO] [stdout] 51 | | if rate_limit_per_user.get() > 21600 { [INFO] [stdout] 52 | | return Err( [INFO] [stdout] 53 | | "Rate limit per user must be less than 21600 seconds".into(), [INFO] [stdout] ... | [INFO] [stdout] 56 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 50 ~ if let Some(ref rate_limit_per_user) = self.data.rate_limit_per_user [INFO] [stdout] 51 ~ && rate_limit_per_user.get() > 21600 { [INFO] [stdout] 52 | return Err( [INFO] [stdout] 53 | "Rate limit per user must be less than 21600 seconds".into(), [INFO] [stdout] 54 | ); [INFO] [stdout] 55 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/channels/edit_channel.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | / if let Some(ref default_thread_rate_limit_per_user) = [INFO] [stdout] 92 | | self.data.default_thread_rate_limit_per_user [INFO] [stdout] 93 | | { [INFO] [stdout] 94 | | if default_thread_rate_limit_per_user.get() > 21600 { [INFO] [stdout] ... | [INFO] [stdout] 99 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 92 ~ self.data.default_thread_rate_limit_per_user [INFO] [stdout] 93 ~ && default_thread_rate_limit_per_user.get() > 21600 { [INFO] [stdout] 94 | return Err( [INFO] [stdout] 95 | "Default thread rate limit per user must be less than 21600 seconds".into() [INFO] [stdout] 96 | ); [INFO] [stdout] 97 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/invites/delete_invite.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | / if let Some(guild) = invite.guild { [INFO] [stdout] 28 | | if guild.id != this.controller().guild_context()? { [INFO] [stdout] 29 | | return Err("Invite does not belong to the current guild".into()); [INFO] [stdout] 30 | | } [INFO] [stdout] 31 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 27 ~ if let Some(guild) = invite.guild [INFO] [stdout] 28 ~ && guild.id != this.controller().guild_context()? { [INFO] [stdout] 29 | return Err("Invite does not belong to the current guild".into()); [INFO] [stdout] 30 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | / if let Some(ref name) = self.data.name { [INFO] [stdout] 20 | | if name.len() < 2 || name.len() > 100 { [INFO] [stdout] 21 | | return Err( [INFO] [stdout] 22 | | "Name must be between 2 and 100 characters".into(), [INFO] [stdout] ... | [INFO] [stdout] 25 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 19 ~ if let Some(ref name) = self.data.name [INFO] [stdout] 20 ~ && (name.len() < 2 || name.len() > 100) { [INFO] [stdout] 21 | return Err( [INFO] [stdout] 22 | "Name must be between 2 and 100 characters".into(), [INFO] [stdout] 23 | ); [INFO] [stdout] 24 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | / if let Some(ref description) = self.data.description { [INFO] [stdout] 28 | | if description.len() > 300 { [INFO] [stdout] 29 | | return Err( [INFO] [stdout] 30 | | "Description must be less than 300 characters".into(), [INFO] [stdout] ... | [INFO] [stdout] 33 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 27 ~ if let Some(ref description) = self.data.description [INFO] [stdout] 28 ~ && description.len() > 300 { [INFO] [stdout] 29 | return Err( [INFO] [stdout] 30 | "Description must be less than 300 characters".into(), [INFO] [stdout] 31 | ); [INFO] [stdout] 32 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild.rs:118:9 [INFO] [stdout] | [INFO] [stdout] 118 | / if let Some(ref features) = self.data.features { [INFO] [stdout] 119 | | if ( [INFO] [stdout] 120 | | (features.contains(&"COMMUNITY".into()) && !guild_has_community) || [INFO] [stdout] 121 | | (!features.contains(&"COMMUNITY".into()) && guild_has_community) [INFO] [stdout] ... | [INFO] [stdout] 125 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 118 ~ if let Some(ref features) = self.data.features [INFO] [stdout] 119 ~ && ( [INFO] [stdout] 120 | (features.contains(&"COMMUNITY".into()) && !guild_has_community) || [INFO] [stdout] ... [INFO] [stdout] 123 | return Err("Enabling/disabling the community feature requires the bot to have the Administrator permission".into()); [INFO] [stdout] 124 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/create_guild_channel.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | / if let Some(ref topic) = self.data.topic { [INFO] [stdout] 24 | | if topic.len() > 1024 { [INFO] [stdout] 25 | | return Err("Topic must be less than 1024 characters".into()); [INFO] [stdout] 26 | | } [INFO] [stdout] 27 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 23 ~ if let Some(ref topic) = self.data.topic [INFO] [stdout] 24 ~ && topic.len() > 1024 { [INFO] [stdout] 25 | return Err("Topic must be less than 1024 characters".into()); [INFO] [stdout] 26 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/create_guild_channel.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | / if let Some(ref rate_limit_per_user) = self.data.rate_limit_per_user { [INFO] [stdout] 30 | | if rate_limit_per_user.get() > 21600 { [INFO] [stdout] 31 | | return Err("Rate limit per user must be less than 21600 seconds".into()); [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 29 ~ if let Some(ref rate_limit_per_user) = self.data.rate_limit_per_user [INFO] [stdout] 30 ~ && rate_limit_per_user.get() > 21600 { [INFO] [stdout] 31 | return Err("Rate limit per user must be less than 21600 seconds".into()); [INFO] [stdout] 32 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/create_guild_channel.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | / if let Some(ref default_thread_rate_limit_per_user) = [INFO] [stdout] 63 | | self.data.default_thread_rate_limit_per_user [INFO] [stdout] 64 | | { [INFO] [stdout] 65 | | if default_thread_rate_limit_per_user.get() > 21600 { [INFO] [stdout] ... | [INFO] [stdout] 68 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 63 ~ self.data.default_thread_rate_limit_per_user [INFO] [stdout] 64 ~ && default_thread_rate_limit_per_user.get() > 21600 { [INFO] [stdout] 65 | return Err("Default thread rate limit per user must be less than 21600 seconds".into()); [INFO] [stdout] 66 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/list_guild_members.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | / if let Some(limit) = self.limit { [INFO] [stdout] 14 | | if limit.get() > 1000 { [INFO] [stdout] 15 | | return Err("The maximum `limit` for get_guild_members is 1000".into()); [INFO] [stdout] 16 | | } [INFO] [stdout] 17 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 13 ~ if let Some(limit) = self.limit [INFO] [stdout] 14 ~ && limit.get() > 1000 { [INFO] [stdout] 15 | return Err("The maximum `limit` for get_guild_members is 1000".into()); [INFO] [stdout] 16 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/search_guild_members.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | / if let Some(limit) = self.limit { [INFO] [stdout] 14 | | if limit.get() > 1000 { [INFO] [stdout] 15 | | return Err("The maximum `limit` for get_guild_members is 1000".into()); [INFO] [stdout] 16 | | } [INFO] [stdout] 17 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 13 ~ if let Some(limit) = self.limit [INFO] [stdout] 14 ~ && limit.get() > 1000 { [INFO] [stdout] 15 | return Err("The maximum `limit` for get_guild_members is 1000".into()); [INFO] [stdout] 16 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_member.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | / if let Some(mute) = self.data.mute { [INFO] [stdout] 48 | | if mute { [INFO] [stdout] 49 | | needed_perms |= Permissions::MUTE_MEMBERS; [INFO] [stdout] 50 | | } [INFO] [stdout] 51 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 47 ~ if let Some(mute) = self.data.mute [INFO] [stdout] 48 ~ && mute { [INFO] [stdout] 49 | needed_perms |= Permissions::MUTE_MEMBERS; [INFO] [stdout] 50 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_member.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | / if let Some(deaf) = self.data.deaf { [INFO] [stdout] 54 | | if deaf { [INFO] [stdout] 55 | | needed_perms |= Permissions::DEAFEN_MEMBERS; [INFO] [stdout] 56 | | } [INFO] [stdout] 57 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 53 ~ if let Some(deaf) = self.data.deaf [INFO] [stdout] 54 ~ && deaf { [INFO] [stdout] 55 | needed_perms |= Permissions::DEAFEN_MEMBERS; [INFO] [stdout] 56 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_member.rs:64:13 [INFO] [stdout] | [INFO] [stdout] 64 | / if let Some(crdu) = communication_disabled_until { [INFO] [stdout] 65 | | if crdu > (chrono::Utc::now() + chrono::Duration::days(28) + chrono::Duration::seconds(10)) { [INFO] [stdout] 66 | | return Err("Communication disabled until must be less than 28 days in the future".into()); [INFO] [stdout] 67 | | } [INFO] [stdout] 68 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 64 ~ if let Some(crdu) = communication_disabled_until [INFO] [stdout] 65 ~ && crdu > (chrono::Utc::now() + chrono::Duration::days(28) + chrono::Duration::seconds(10)) { [INFO] [stdout] 66 | return Err("Communication disabled until must be less than 28 days in the future".into()); [INFO] [stdout] 67 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_member.rs:98:32 [INFO] [stdout] | [INFO] [stdout] 98 | let bot_highest_role = highest_role(&guild, &member) [INFO] [stdout] | ________________________________^ [INFO] [stdout] 99 | | .ok_or_else(|| "Bot does not have a role")?; [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 99 - .ok_or_else(|| "Bot does not have a role")?; [INFO] [stdout] 99 + .ok_or("Bot does not have a role")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/get_guild_bans.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | / if let Some(limit) = self.limit { [INFO] [stdout] 30 | | if limit.get() > 1000 { [INFO] [stdout] 31 | | return Err("Limit must be less than 1000".into()); [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 29 ~ if let Some(limit) = self.limit [INFO] [stdout] 30 ~ && limit.get() > 1000 { [INFO] [stdout] 31 | return Err("Limit must be less than 1000".into()); [INFO] [stdout] 32 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/create_guild_role.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | / if let Some(ref name) = self.data.name { [INFO] [stdout] 17 | | if name.len() > 100 || name.is_empty() { [INFO] [stdout] 18 | | return Err("Role name must be a maximum of 100 characters and not empty".into()); [INFO] [stdout] 19 | | } [INFO] [stdout] 20 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 16 ~ if let Some(ref name) = self.data.name [INFO] [stdout] 17 ~ && (name.len() > 100 || name.is_empty()) { [INFO] [stdout] 18 | return Err("Role name must be a maximum of 100 characters and not empty".into()); [INFO] [stdout] 19 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/create_guild_role.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | / if let Some(permissions) = self.data.permissions { [INFO] [stdout] 40 | | if !bot_perms.contains(permissions) { [INFO] [stdout] 41 | | return Err(format!("Bot does not have permissions: {:?}", permissions.difference(bot_perms)).into()); [INFO] [stdout] 42 | | } [INFO] [stdout] 43 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 39 ~ if let Some(permissions) = self.data.permissions [INFO] [stdout] 40 ~ && !bot_perms.contains(permissions) { [INFO] [stdout] 41 | return Err(format!("Bot does not have permissions: {:?}", permissions.difference(bot_perms)).into()); [INFO] [stdout] 42 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_role_positions.rs:24:32 [INFO] [stdout] | [INFO] [stdout] 24 | let bot_highest_role = highest_role(&guild, &member) [INFO] [stdout] | ________________________________^ [INFO] [stdout] 25 | | .ok_or_else(|| "Bot does not have a role")?; [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 25 - .ok_or_else(|| "Bot does not have a role")?; [INFO] [stdout] 25 + .ok_or("Bot does not have a role")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_role.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | / if let Some(ref name) = self.data.name { [INFO] [stdout] 18 | | if name.len() > 100 || name.is_empty() { [INFO] [stdout] 19 | | return Err("Role name must be a maximum of 100 characters and not empty".into()); [INFO] [stdout] 20 | | } [INFO] [stdout] 21 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 17 ~ if let Some(ref name) = self.data.name [INFO] [stdout] 18 ~ && (name.len() > 100 || name.is_empty()) { [INFO] [stdout] 19 | return Err("Role name must be a maximum of 100 characters and not empty".into()); [INFO] [stdout] 20 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_role.rs:33:32 [INFO] [stdout] | [INFO] [stdout] 33 | let bot_highest_role = highest_role(&guild, &member) [INFO] [stdout] | ________________________________^ [INFO] [stdout] 34 | | .ok_or_else(|| "The bot must have roles in order to modify a guild role")?; [INFO] [stdout] | |_____________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 34 - .ok_or_else(|| "The bot must have roles in order to modify a guild role")?; [INFO] [stdout] 34 + .ok_or("The bot must have roles in order to modify a guild role")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_role.rs:36:24 [INFO] [stdout] | [INFO] [stdout] 36 | let mod_role = guild.roles.get(&self.role_id) [INFO] [stdout] | ________________________^ [INFO] [stdout] 37 | | .ok_or_else(|| "The role being modified could not be found on the server")?; [INFO] [stdout] | |______________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 37 - .ok_or_else(|| "The role being modified could not be found on the server")?; [INFO] [stdout] 37 + .ok_or("The role being modified could not be found on the server")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/guilds/modify_guild_role.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | / if let Some(permissions) = self.data.permissions { [INFO] [stdout] 51 | | if !bot_perms.contains(permissions) { [INFO] [stdout] 52 | | return Err(format!("Bot does not have permissions: {:?}", permissions.difference(bot_perms)).into()); [INFO] [stdout] 53 | | } [INFO] [stdout] 54 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 50 ~ if let Some(permissions) = self.data.permissions [INFO] [stdout] 51 ~ && !bot_perms.contains(permissions) { [INFO] [stdout] 52 | return Err(format!("Bot does not have permissions: {:?}", permissions.difference(bot_perms)).into()); [INFO] [stdout] 53 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/dapi/src/api/guilds/delete_guild_role.rs:30:32 [INFO] [stdout] | [INFO] [stdout] 30 | let bot_highest_role = highest_role(&guild, &member) [INFO] [stdout] | ________________________________^ [INFO] [stdout] 31 | | .ok_or_else(|| "The bot must have roles in order to modify a guild role")?; [INFO] [stdout] | |_____________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 31 - .ok_or_else(|| "The bot must have roles in order to modify a guild role")?; [INFO] [stdout] 31 + .ok_or("The bot must have roles in order to modify a guild role")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> crates/dapi/src/api/guilds/delete_guild_role.rs:33:24 [INFO] [stdout] | [INFO] [stdout] 33 | let mod_role = guild.roles.get(&self.role_id) [INFO] [stdout] | ________________________^ [INFO] [stdout] 34 | | .ok_or_else(|| "The role being modified could not be found on the server")?; [INFO] [stdout] | |______________________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 34 - .ok_or_else(|| "The role being modified could not be found on the server")?; [INFO] [stdout] 34 + .ok_or("The role being modified could not be found on the server")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> crates/dapi/src/api/webhooks/modify_webhook.rs:17:21 [INFO] [stdout] | [INFO] [stdout] 17 | if let Some(ref avatar) = self.data.avatar.as_inner_ref() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 17 - if let Some(ref avatar) = self.data.avatar.as_inner_ref() { [INFO] [stdout] 17 + if let Some(avatar) = self.data.avatar.as_inner_ref() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> crates/dapi/src/api/invites/delete_invite.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | / if let Some(guild) = invite.guild { [INFO] [stdout] 28 | | if guild.id != this.controller().guild_context()? { [INFO] [stdout] 29 | | return Err("Invite does not belong to the current guild".into()); [INFO] [stdout] 30 | | } [INFO] [stdout] 31 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 27 ~ if let Some(guild) = invite.guild [INFO] [stdout] 28 ~ && guild.id != this.controller().guild_context()? { [INFO] [stdout] 29 | return Err("Invite does not belong to the current guild".into()); [INFO] [stdout] 30 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/dapi/src/lib.rs:44:35 [INFO] [stdout] | [INFO] [stdout] 44 | pub fn get_format_from_image_data<'a>(data: &'a str) -> Result<&'a str, crate::Error> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 44 - pub fn get_format_from_image_data<'a>(data: &'a str) -> Result<&'a str, crate::Error> { [INFO] [stdout] 44 + pub fn get_format_from_image_data(data: &str) -> Result<&str, crate::Error> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> crates/dapi/src/lib.rs:44:35 [INFO] [stdout] | [INFO] [stdout] 44 | pub fn get_format_from_image_data<'a>(data: &'a str) -> Result<&'a str, crate::Error> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 44 - pub fn get_format_from_image_data<'a>(data: &'a str) -> Result<&'a str, crate::Error> { [INFO] [stdout] 44 + pub fn get_format_from_image_data(data: &str) -> Result<&str, crate::Error> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking khronos_runtime v1.0.0 (/opt/rustwide/workdir/crates/runtime) [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> crates/runtime/src/core/interop.rs:19:42 [INFO] [stdout] | [INFO] [stdout] 19 | lua.create_function(|lua, _: ()| Ok(lua.memory_limit()?))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 19 - lua.create_function(|lua, _: ()| Ok(lua.memory_limit()?))?, [INFO] [stdout] 19 + lua.create_function(|lua, _: ()| lua.memory_limit())?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/runtime/src/core/typesext.rs:815:75 [INFO] [stdout] | [INFO] [stdout] 815 | ... mluau_require::create_memory_vfs_from_map(&map) [INFO] [stdout] | ^^^^ help: change this to: `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TarArchive` [INFO] [stdout] --> crates/runtime/src/core/datamgmt.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | / pub fn new() -> Self { [INFO] [stdout] 30 | | TarArchive { [INFO] [stdout] 31 | | entries: HashMap::new(), [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | } [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] 27 + impl Default for TarArchive { [INFO] [stdout] 28 + fn default() -> Self { [INFO] [stdout] 29 + Self::new() [INFO] [stdout] 30 + } [INFO] [stdout] 31 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> crates/runtime/src/core/datamgmt.rs:196:43 [INFO] [stdout] | [INFO] [stdout] 196 | let input = tokio::io::BufReader::new(data.as_ref()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `data` [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: this call to `as_ref` does nothing [INFO] [stdout] --> crates/runtime/src/core/datamgmt.rs:222:43 [INFO] [stdout] | [INFO] [stdout] 222 | let input = tokio::io::BufReader::new(data.as_ref()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/runtime/src/core/datamgmt.rs:337:39 [INFO] [stdout] | [INFO] [stdout] 337 | compress_data(format, &*s.as_bytes(), level).await [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `&s.as_bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/runtime/src/core/datamgmt.rs:353:41 [INFO] [stdout] | [INFO] [stdout] 353 | decompress_data(format, &*s.as_bytes()).await [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `&s.as_bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `OneshotChannel` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | / pub fn new() -> Self { [INFO] [stdout] 27 | | let (tx, rx) = tokio::sync::oneshot::channel(); [INFO] [stdout] 28 | | Self { [INFO] [stdout] 29 | | tx: Rc::new(RefCell::new(Some(tx))), [INFO] [stdout] ... | [INFO] [stdout] 32 | | } [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] 25 + impl Default for OneshotChannel { [INFO] [stdout] 26 + fn default() -> Self { [INFO] [stdout] 27 + Self::new() [INFO] [stdout] 28 + } [INFO] [stdout] 29 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a disallowed method `std::cell::RefCell::borrow_mut` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:38:32 [INFO] [stdout] | [INFO] [stdout] 38 | let chan = this.tx.borrow_mut().take() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods [INFO] [stdout] = note: `#[warn(clippy::disallowed_methods)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a disallowed method `std::cell::RefCell::borrow_mut` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:48:30 [INFO] [stdout] | [INFO] [stdout] 48 | let rx = this.rx.borrow_mut().take() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a disallowed method `std::cell::RefCell::borrow_mut` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:58:30 [INFO] [stdout] | [INFO] [stdout] 58 | let rx = this.rx.borrow_mut().take() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DelayChannel` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | / pub fn new() -> Self { [INFO] [stdout] 129 | | Self { [INFO] [stdout] 130 | | queue: Rc::new(RefCell::new(DelayQueue::new())), [INFO] [stdout] 131 | | waiting_add: Rc::new(RefCell::new(None)), [INFO] [stdout] 132 | | } [INFO] [stdout] 133 | | } [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] 127 + impl Default for DelayChannel { [INFO] [stdout] 128 + fn default() -> Self { [INFO] [stdout] 129 + Self::new() [INFO] [stdout] 130 + } [INFO] [stdout] 131 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a disallowed method `std::cell::RefCell::borrow_mut` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:145:30 [INFO] [stdout] | [INFO] [stdout] 145 | let key = self.queue.borrow_mut().insert(Item { value, final_expiry, key: key_cell.clone() }, safe_delay); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a disallowed method `std::cell::RefCell::borrow_mut` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:147:47 [INFO] [stdout] | [INFO] [stdout] 147 | if let Some(waker) = self.waiting_add.borrow_mut().take() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/runtime/src/core/channel.rs:161:28 [INFO] [stdout] | [INFO] [stdout] 161 | Some(value) => return Ok(value), [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] 161 - Some(value) => return Ok(value), [INFO] [stdout] 161 + Some(value) => Ok(value), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/runtime/src/core/channel.rs:164:17 [INFO] [stdout] | [INFO] [stdout] 164 | return Err(LuaError::external("Delay channel closed unexpectedly")); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 164 - return Err(LuaError::external("Delay channel closed unexpectedly")); [INFO] [stdout] 164 + Err(LuaError::external("Delay channel closed unexpectedly")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> crates/runtime/src/core/channel.rs:178:13 [INFO] [stdout] | [INFO] [stdout] 178 | Ok(this.queue.try_borrow_mut().map_err(LuaError::external)?.clear()) [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] 178 ~ let _: () = this.queue.try_borrow_mut().map_err(LuaError::external)?.clear(); [INFO] [stdout] 179 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a disallowed method `std::cell::RefCell::borrow_mut` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:200:36 [INFO] [stdout] | [INFO] [stdout] 200 | let mut queue = self.queue.borrow_mut(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a disallowed method `std::cell::RefCell::borrow_mut` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:230:39 [INFO] [stdout] | [INFO] [stdout] 230 | *self.waiting_add.borrow_mut() = Some(cx.waker().clone()); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a disallowed method `std::cell::RefCell::borrow_mut` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:257:30 [INFO] [stdout] | [INFO] [stdout] 257 | let rx = chan.rx.borrow_mut().take() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> crates/runtime/src/plugins/antiraid/discord/mod.rs:96:24 [INFO] [stdout] | [INFO] [stdout] 96 | if b_action != &action { [INFO] [stdout] | ^^^^^^^^^^^^------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `action` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/runtime/src/plugins/antiraid/discord/mod.rs:121:29 [INFO] [stdout] | [INFO] [stdout] 121 | .attempt_action(&action) [INFO] [stdout] | ^^^^^^^ help: change this to: `action` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/runtime/src/plugins/antiraid/discord/mod.rs:162:36 [INFO] [stdout] | [INFO] [stdout] 162 | this.check_action_impl(&lua, "antiraid_bulk_op") [INFO] [stdout] | ^^^^ help: change this to: `lua` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> crates/runtime/src/core/interop.rs:19:42 [INFO] [stdout] | [INFO] [stdout] 19 | lua.create_function(|lua, _: ()| Ok(lua.memory_limit()?))?, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 19 - lua.create_function(|lua, _: ()| Ok(lua.memory_limit()?))?, [INFO] [stdout] 19 + lua.create_function(|lua, _: ()| lua.memory_limit())?, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_vec` [INFO] [stdout] --> crates/runtime/src/plugins/antiraid/httpclient/mod.rs:269:42 [INFO] [stdout] | [INFO] [stdout] 269 | return lua.create_buffer(bytes.to_vec()) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use: `bytes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/runtime/src/core/typesext.rs:815:75 [INFO] [stdout] | [INFO] [stdout] 815 | ... mluau_require::create_memory_vfs_from_map(&map) [INFO] [stdout] | ^^^^ help: change this to: `map` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/runtime/src/plugins/antiraid/objectstorage/mod.rs:25:59 [INFO] [stdout] | [INFO] [stdout] 25 | table.set("last_modified", self.last_modified.map(|dt| DateTime::from_utc(dt)))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `DateTime::from_utc` [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: you should consider adding a `Default` implementation for `TarArchive` [INFO] [stdout] --> crates/runtime/src/core/datamgmt.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | / pub fn new() -> Self { [INFO] [stdout] 30 | | TarArchive { [INFO] [stdout] 31 | | entries: HashMap::new(), [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | } [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] 27 + impl Default for TarArchive { [INFO] [stdout] 28 + fn default() -> Self { [INFO] [stdout] 29 + Self::new() [INFO] [stdout] 30 + } [INFO] [stdout] 31 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/runtime/src/plugins/antiraid/runtime/mod.rs:25:50 [INFO] [stdout] | [INFO] [stdout] 25 | self.runtime_provider.attempt_action(&action)?; // Check rate limits [INFO] [stdout] | ^^^^^^^ help: change this to: `action` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this call to `as_ref` does nothing [INFO] [stdout] --> crates/runtime/src/core/datamgmt.rs:196:43 [INFO] [stdout] | [INFO] [stdout] 196 | let input = tokio::io::BufReader::new(data.as_ref()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `data` [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: this call to `as_ref` does nothing [INFO] [stdout] --> crates/runtime/src/core/datamgmt.rs:222:43 [INFO] [stdout] | [INFO] [stdout] 222 | let input = tokio::io::BufReader::new(data.as_ref()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/runtime/src/core/datamgmt.rs:337:39 [INFO] [stdout] | [INFO] [stdout] 337 | compress_data(format, &*s.as_bytes(), level).await [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `&s.as_bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> crates/runtime/src/core/datamgmt.rs:353:41 [INFO] [stdout] | [INFO] [stdout] 353 | decompress_data(format, &*s.as_bytes()).await [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `&s.as_bytes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `OneshotChannel` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | / pub fn new() -> Self { [INFO] [stdout] 27 | | let (tx, rx) = tokio::sync::oneshot::channel(); [INFO] [stdout] 28 | | Self { [INFO] [stdout] 29 | | tx: Rc::new(RefCell::new(Some(tx))), [INFO] [stdout] ... | [INFO] [stdout] 32 | | } [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] 25 + impl Default for OneshotChannel { [INFO] [stdout] 26 + fn default() -> Self { [INFO] [stdout] 27 + Self::new() [INFO] [stdout] 28 + } [INFO] [stdout] 29 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a disallowed method `std::cell::RefCell::borrow_mut` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:38:32 [INFO] [stdout] | [INFO] [stdout] 38 | let chan = this.tx.borrow_mut().take() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods [INFO] [stdout] = note: `#[warn(clippy::disallowed_methods)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a disallowed method `std::cell::RefCell::borrow_mut` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:48:30 [INFO] [stdout] | [INFO] [stdout] 48 | let rx = this.rx.borrow_mut().take() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a disallowed method `std::cell::RefCell::borrow_mut` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:58:30 [INFO] [stdout] | [INFO] [stdout] 58 | let rx = this.rx.borrow_mut().take() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `DelayChannel` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:128:5 [INFO] [stdout] | [INFO] [stdout] 128 | / pub fn new() -> Self { [INFO] [stdout] 129 | | Self { [INFO] [stdout] 130 | | queue: Rc::new(RefCell::new(DelayQueue::new())), [INFO] [stdout] 131 | | waiting_add: Rc::new(RefCell::new(None)), [INFO] [stdout] 132 | | } [INFO] [stdout] 133 | | } [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] 127 + impl Default for DelayChannel { [INFO] [stdout] 128 + fn default() -> Self { [INFO] [stdout] 129 + Self::new() [INFO] [stdout] 130 + } [INFO] [stdout] 131 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a disallowed method `std::cell::RefCell::borrow_mut` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:145:30 [INFO] [stdout] | [INFO] [stdout] 145 | let key = self.queue.borrow_mut().insert(Item { value, final_expiry, key: key_cell.clone() }, safe_delay); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a disallowed method `std::cell::RefCell::borrow_mut` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:147:47 [INFO] [stdout] | [INFO] [stdout] 147 | if let Some(waker) = self.waiting_add.borrow_mut().take() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/runtime/src/core/channel.rs:161:28 [INFO] [stdout] | [INFO] [stdout] 161 | Some(value) => return Ok(value), [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] 161 - Some(value) => return Ok(value), [INFO] [stdout] 161 + Some(value) => Ok(value), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/runtime/src/core/channel.rs:164:17 [INFO] [stdout] | [INFO] [stdout] 164 | return Err(LuaError::external("Delay channel closed unexpectedly")); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 164 - return Err(LuaError::external("Delay channel closed unexpectedly")); [INFO] [stdout] 164 + Err(LuaError::external("Delay channel closed unexpectedly")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> crates/runtime/src/primitives/event.rs:100:9 [INFO] [stdout] | [INFO] [stdout] 100 | / match self.author { [INFO] [stdout] 101 | | Some(author) => tab.set("author", author.as_str())?, [INFO] [stdout] 102 | | None => {}, [INFO] [stdout] 103 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(author) = self.author { tab.set("author", author.as_str())? }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/runtime/src/primitives/event.rs:112:34 [INFO] [stdout] | [INFO] [stdout] 112 | .map_err(|e| LuaError::external(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `LuaError::external` [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: passing a unit value to a function [INFO] [stdout] --> crates/runtime/src/core/channel.rs:178:13 [INFO] [stdout] | [INFO] [stdout] 178 | Ok(this.queue.try_borrow_mut().map_err(LuaError::external)?.clear()) [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] 178 ~ let _: () = this.queue.try_borrow_mut().map_err(LuaError::external)?.clear(); [INFO] [stdout] 179 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a disallowed method `std::cell::RefCell::borrow_mut` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:200:36 [INFO] [stdout] | [INFO] [stdout] 200 | let mut queue = self.queue.borrow_mut(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a disallowed method `std::cell::RefCell::borrow_mut` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:230:39 [INFO] [stdout] | [INFO] [stdout] 230 | *self.waiting_add.borrow_mut() = Some(cx.waker().clone()); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a disallowed method `std::cell::RefCell::borrow_mut` [INFO] [stdout] --> crates/runtime/src/core/channel.rs:257:30 [INFO] [stdout] | [INFO] [stdout] 257 | let rx = chan.rx.borrow_mut().take() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_methods [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> crates/runtime/src/plugins/antiraid/discord/mod.rs:96:24 [INFO] [stdout] | [INFO] [stdout] 96 | if b_action != &action { [INFO] [stdout] | ^^^^^^^^^^^^------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `action` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/runtime/src/plugins/antiraid/discord/mod.rs:121:29 [INFO] [stdout] | [INFO] [stdout] 121 | .attempt_action(&action) [INFO] [stdout] | ^^^^^^^ help: change this to: `action` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/runtime/src/plugins/antiraid/discord/mod.rs:162:36 [INFO] [stdout] | [INFO] [stdout] 162 | this.check_action_impl(&lua, "antiraid_bulk_op") [INFO] [stdout] | ^^^^ help: change this to: `lua` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/runtime/src/rt/runtime.rs:424:17 [INFO] [stdout] | [INFO] [stdout] 424 | return Err(e); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 424 - return Err(e); [INFO] [stdout] 424 + Err(e) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/runtime/src/traits/context.rs:174:27 [INFO] [stdout] | [INFO] [stdout] 174 | fn extra_plugins() -> indexmap::IndexMap) -> LuaResult>> { [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: unnecessary use of `to_vec` [INFO] [stdout] --> crates/runtime/src/plugins/antiraid/httpclient/mod.rs:269:42 [INFO] [stdout] | [INFO] [stdout] 269 | return lua.create_buffer(bytes.to_vec()) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use: `bytes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> crates/runtime/src/utils/khronos_value.rs:26:1 [INFO] [stdout] | [INFO] [stdout] 26 | / impl Default for KhronosValue { [INFO] [stdout] 27 | | fn default() -> Self { [INFO] [stdout] 28 | | KhronosValue::Null [INFO] [stdout] 29 | | } [INFO] [stdout] 30 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 9 + #[derive(Default)] [INFO] [stdout] 10 | pub enum KhronosValue { [INFO] [stdout] 11 | Text(String), [INFO] [stdout] ... [INFO] [stdout] 23 | MemoryVfs(HashMap), [INFO] [stdout] 24 ~ #[default] [INFO] [stdout] 25 ~ Null, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/runtime/src/plugins/antiraid/objectstorage/mod.rs:25:59 [INFO] [stdout] | [INFO] [stdout] 25 | table.set("last_modified", self.last_modified.map(|dt| DateTime::from_utc(dt)))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `DateTime::from_utc` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> crates/runtime/src/plugins/antiraid/runtime/mod.rs:25:50 [INFO] [stdout] | [INFO] [stdout] 25 | self.runtime_provider.attempt_action(&action)?; // Check rate limits [INFO] [stdout] | ^^^^^^^ help: change this to: `action` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> crates/runtime/src/primitives/event.rs:100:9 [INFO] [stdout] | [INFO] [stdout] 100 | / match self.author { [INFO] [stdout] 101 | | Some(author) => tab.set("author", author.as_str())?, [INFO] [stdout] 102 | | None => {}, [INFO] [stdout] 103 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(author) = self.author { tab.set("author", author.as_str())? }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> crates/runtime/src/primitives/event.rs:112:34 [INFO] [stdout] | [INFO] [stdout] 112 | .map_err(|e| LuaError::external(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `LuaError::external` [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: unneeded `return` statement [INFO] [stdout] --> crates/runtime/src/rt/runtime.rs:424:17 [INFO] [stdout] | [INFO] [stdout] 424 | return Err(e); [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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 424 - return Err(e); [INFO] [stdout] 424 + Err(e) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> crates/runtime/src/traits/context.rs:174:27 [INFO] [stdout] | [INFO] [stdout] 174 | fn extra_plugins() -> indexmap::IndexMap) -> LuaResult>> { [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 `impl` can be derived [INFO] [stdout] --> crates/runtime/src/utils/khronos_value.rs:26:1 [INFO] [stdout] | [INFO] [stdout] 26 | / impl Default for KhronosValue { [INFO] [stdout] 27 | | fn default() -> Self { [INFO] [stdout] 28 | | KhronosValue::Null [INFO] [stdout] 29 | | } [INFO] [stdout] 30 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 9 + #[derive(Default)] [INFO] [stdout] 10 | pub enum KhronosValue { [INFO] [stdout] 11 | Text(String), [INFO] [stdout] ... [INFO] [stdout] 23 | MemoryVfs(HashMap), [INFO] [stdout] 24 ~ #[default] [INFO] [stdout] 25 ~ Null, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking khronos_cli v1.0.0 (/opt/rustwide/workdir/crates/cli) [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> crates/cli/src/tui/app.rs:232:5 [INFO] [stdout] | [INFO] [stdout] 232 | / /// toggle help modal - removed in favor of toggle_help_modal [INFO] [stdout] ... | [INFO] [stdout] 236 | | [INFO] [stdout] | |_^ [INFO] [stdout] 237 | /// Scroll output up [INFO] [stdout] 238 | pub fn scroll_up(&mut self, amount: usize) { [INFO] [stdout] | ---------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document function `scroll_up` then comment it out [INFO] [stdout] | [INFO] [stdout] 232 | // /// toggle help modal - removed in favor of toggle_help_modal [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> crates/cli/src/tui/app.rs:232:5 [INFO] [stdout] | [INFO] [stdout] 232 | / /// toggle help modal - removed in favor of toggle_help_modal [INFO] [stdout] ... | [INFO] [stdout] 236 | | [INFO] [stdout] | |_^ [INFO] [stdout] 237 | /// Scroll output up [INFO] [stdout] 238 | pub fn scroll_up(&mut self, amount: usize) { [INFO] [stdout] | ---------------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document function `scroll_up` then comment it out [INFO] [stdout] | [INFO] [stdout] 232 | // /// toggle help modal - removed in favor of toggle_help_modal [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cli/src/provider/mod.rs:670:9 [INFO] [stdout] | [INFO] [stdout] 670 | / return Ok(runtime_ir::TenantState { [INFO] [stdout] 671 | | events: vec!["INTERACTION_CREATE".to_string()], [INFO] [stdout] 672 | | banned: false, [INFO] [stdout] 673 | | flags: 0, [INFO] [stdout] 674 | | }); [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] 670 ~ Ok(runtime_ir::TenantState { [INFO] [stdout] 671 + events: vec!["INTERACTION_CREATE".to_string()], [INFO] [stdout] 672 + banned: false, [INFO] [stdout] 673 + flags: 0, [INFO] [stdout] 674 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Iterator::find` [INFO] [stdout] --> crates/cli/src/tui/app.rs:320:9 [INFO] [stdout] | [INFO] [stdout] 320 | / for &cmd in SLASH_COMMANDS { [INFO] [stdout] 321 | | if cmd.starts_with(trimmed) && cmd.len() > trimmed.len() { [INFO] [stdout] 322 | | return Some(cmd); [INFO] [stdout] ... | [INFO] [stdout] 326 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `SLASH_COMMANDS.iter().find(|&&cmd| cmd.starts_with(trimmed) && cmd.len() > trimmed.len()).copied().map(|v| v as _)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> crates/cli/src/provider/mod.rs:670:9 [INFO] [stdout] | [INFO] [stdout] 670 | / return Ok(runtime_ir::TenantState { [INFO] [stdout] 671 | | events: vec!["INTERACTION_CREATE".to_string()], [INFO] [stdout] 672 | | banned: false, [INFO] [stdout] 673 | | flags: 0, [INFO] [stdout] 674 | | }); [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] 670 ~ Ok(runtime_ir::TenantState { [INFO] [stdout] 671 + events: vec!["INTERACTION_CREATE".to_string()], [INFO] [stdout] 672 + banned: false, [INFO] [stdout] 673 + flags: 0, [INFO] [stdout] 674 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Theme` which implements the `Copy` trait [INFO] [stdout] --> crates/cli/src/tui/ui.rs:32:44 [INFO] [stdout] | [INFO] [stdout] 32 | frame.render_widget(Dashboard::new(theme.clone()), main_chunks[0]); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*theme` [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 `Theme` which implements the `Copy` trait [INFO] [stdout] --> crates/cli/src/tui/ui.rs:63:44 [INFO] [stdout] | [INFO] [stdout] 63 | frame.render_widget(Dashboard::new(theme.clone()), help_area); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*theme` [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: manual implementation of `Iterator::find` [INFO] [stdout] --> crates/cli/src/tui/app.rs:320:9 [INFO] [stdout] | [INFO] [stdout] 320 | / for &cmd in SLASH_COMMANDS { [INFO] [stdout] 321 | | if cmd.starts_with(trimmed) && cmd.len() > trimmed.len() { [INFO] [stdout] 322 | | return Some(cmd); [INFO] [stdout] ... | [INFO] [stdout] 326 | | None [INFO] [stdout] | |____________^ help: replace with an iterator: `SLASH_COMMANDS.iter().find(|&&cmd| cmd.starts_with(trimmed) && cmd.len() > trimmed.len()).copied().map(|v| v as _)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find [INFO] [stdout] = note: `#[warn(clippy::manual_find)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> crates/cli/src/tui/widgets/help_modal.rs:61:39 [INFO] [stdout] | [INFO] [stdout] 61 | Span::styled(format!("{}", k), Style::default().fg(theme.accent).add_modifier(Modifier::BOLD)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `k.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: useless use of `format!` [INFO] [stdout] --> crates/cli/src/tui/widgets/help_modal.rs:66:38 [INFO] [stdout] | [INFO] [stdout] 66 | Span::styled(format!("{}", v), Style::default().fg(theme.foreground)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `v.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> crates/cli/src/tui_entrypoint.rs:191:36 [INFO] [stdout] | [INFO] [stdout] 191 | ... if let Some(_) = app.get_active_suggestion() { [INFO] [stdout] | -------^^^^^^^------------------------------ help: try: `if app.get_active_suggestion().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: using `clone` on type `Theme` which implements the `Copy` trait [INFO] [stdout] --> crates/cli/src/tui/ui.rs:32:44 [INFO] [stdout] | [INFO] [stdout] 32 | frame.render_widget(Dashboard::new(theme.clone()), main_chunks[0]); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*theme` [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 `Theme` which implements the `Copy` trait [INFO] [stdout] --> crates/cli/src/tui/ui.rs:63:44 [INFO] [stdout] | [INFO] [stdout] 63 | frame.render_widget(Dashboard::new(theme.clone()), help_area); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*theme` [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: useless use of `format!` [INFO] [stdout] --> crates/cli/src/tui/widgets/help_modal.rs:61:39 [INFO] [stdout] | [INFO] [stdout] 61 | Span::styled(format!("{}", k), Style::default().fg(theme.accent).add_modifier(Modifier::BOLD)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `k.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: useless use of `format!` [INFO] [stdout] --> crates/cli/src/tui/widgets/help_modal.rs:66:38 [INFO] [stdout] | [INFO] [stdout] 66 | Span::styled(format!("{}", v), Style::default().fg(theme.foreground)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `v.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> crates/cli/src/tui_entrypoint.rs:191:36 [INFO] [stdout] | [INFO] [stdout] 191 | ... if let Some(_) = app.get_active_suggestion() { [INFO] [stdout] | -------^^^^^^^------------------------------ help: try: `if app.get_active_suggestion().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: useless use of `vec!` [INFO] [stdout] --> crates/cli/src/tui/widgets/output_panel.rs:53:25 [INFO] [stdout] | [INFO] [stdout] 53 | let ascii = vec![ [INFO] [stdout] | _________________________^ [INFO] [stdout] 54 | | "", [INFO] [stdout] 55 | | " _ ___ ", [INFO] [stdout] 56 | | " | |/ / |__ _ __ ___ _ __ ___ ___ ", [INFO] [stdout] ... | [INFO] [stdout] 61 | | " Ready to serve. Type a command or press F1 for help.", [INFO] [stdout] 62 | | ]; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 53 ~ let ascii = ["", [INFO] [stdout] 54 + " _ ___ ", [INFO] [stdout] 55 + " | |/ / |__ _ __ ___ _ __ ___ ___ ", [INFO] [stdout] 56 + " | ' /| '_ \\| '__/ _ \\| '_ \\ / _ \\/ __|", [INFO] [stdout] 57 + " | . \\| | | | | | (_) | | | | (_) \\__ \\", [INFO] [stdout] 58 + " |_|\\_\\_| |_|_| \\___/|_| |_|\\___/|___/", [INFO] [stdout] 59 + "", [INFO] [stdout] 60 ~ " Ready to serve. Type a command or press F1 for help."]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> crates/cli/src/tui/widgets/output_panel.rs:53:25 [INFO] [stdout] | [INFO] [stdout] 53 | let ascii = vec![ [INFO] [stdout] | _________________________^ [INFO] [stdout] 54 | | "", [INFO] [stdout] 55 | | " _ ___ ", [INFO] [stdout] 56 | | " | |/ / |__ _ __ ___ _ __ ___ ___ ", [INFO] [stdout] ... | [INFO] [stdout] 61 | | " Ready to serve. Type a command or press F1 for help.", [INFO] [stdout] 62 | | ]; [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 53 ~ let ascii = ["", [INFO] [stdout] 54 + " _ ___ ", [INFO] [stdout] 55 + " | |/ / |__ _ __ ___ _ __ ___ ___ ", [INFO] [stdout] 56 + " | ' /| '_ \\| '__/ _ \\| '_ \\ / _ \\/ __|", [INFO] [stdout] 57 + " | . \\| | | | | | (_) | | | | (_) \\__ \\", [INFO] [stdout] 58 + " |_|\\_\\_| |_|_| \\___/|_| |_|\\___/|___/", [INFO] [stdout] 59 + "", [INFO] [stdout] 60 ~ " Ready to serve. Type a command or press F1 for help."]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 00s [INFO] running `Command { std: "docker" "inspect" "57771597e4980168ec40090869e1d5a4102405211de9ab4d86fb2bfff1adeb70", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "57771597e4980168ec40090869e1d5a4102405211de9ab4d86fb2bfff1adeb70", kill_on_drop: false }` [INFO] [stdout] 57771597e4980168ec40090869e1d5a4102405211de9ab4d86fb2bfff1adeb70