[INFO] cloning repository https://github.com/C0D3-M4513R/mailserver-webui [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/C0D3-M4513R/mailserver-webui" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FC0D3-M4513R%2Fmailserver-webui", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FC0D3-M4513R%2Fmailserver-webui'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] fc7c855eb57d95f4626b7e5ec75adc9ae9bcffc8 [INFO] linting C0D3-M4513R/mailserver-webui against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FC0D3-M4513R%2Fmailserver-webui" "/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/C0D3-M4513R/mailserver-webui [INFO] finished tweaking git repo https://github.com/C0D3-M4513R/mailserver-webui [INFO] tweaked toml for git repo https://github.com/C0D3-M4513R/mailserver-webui written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/C0D3-M4513R/mailserver-webui 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/C0D3-M4513R/mailserver-webui 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] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded askama_macros v0.15.1 [INFO] [stderr] Downloaded askama v0.15.1 [INFO] [stderr] Downloaded sha-crypt v0.5.0 [INFO] [stderr] Downloaded askama_parser v0.15.1 [INFO] [stderr] Downloaded askama_derive v0.15.1 [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] 7da1a0ae8bc67f50817c2f884368f4ddf9a0f62fd1d90f2e14cd0ba2e9f985c2 [INFO] running `Command { std: "docker" "start" "-a" "7da1a0ae8bc67f50817c2f884368f4ddf9a0f62fd1d90f2e14cd0ba2e9f985c2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "7da1a0ae8bc67f50817c2f884368f4ddf9a0f62fd1d90f2e14cd0ba2e9f985c2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7da1a0ae8bc67f50817c2f884368f4ddf9a0f62fd1d90f2e14cd0ba2e9f985c2", kill_on_drop: false }` [INFO] [stdout] 7da1a0ae8bc67f50817c2f884368f4ddf9a0f62fd1d90f2e14cd0ba2e9f985c2 [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] daa752cea7d8b8efa71aa122d572968d41fe0069ad7c76574e3bf6c2630bbd58 [INFO] running `Command { std: "docker" "start" "-a" "daa752cea7d8b8efa71aa122d572968d41fe0069ad7c76574e3bf6c2630bbd58", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.104 [INFO] [stderr] Checking cfg-if v1.0.4 [INFO] [stderr] Checking subtle v2.6.1 [INFO] [stderr] Checking const-oid v0.9.6 [INFO] [stderr] Compiling zerocopy v0.8.31 [INFO] [stderr] Compiling libc v0.2.178 [INFO] [stderr] Compiling typenum v1.19.0 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling cc v1.2.51 [INFO] [stderr] Checking pin-project-lite v0.2.16 [INFO] [stderr] Compiling generic-array v0.14.7 [INFO] [stderr] Compiling stable_deref_trait v1.2.1 [INFO] [stderr] Compiling crossbeam-utils v0.8.21 [INFO] [stderr] Checking futures-core v0.3.31 [INFO] [stderr] Checking itoa v1.0.17 [INFO] [stderr] Checking bytes v1.11.0 [INFO] [stderr] Compiling zmij v1.0.2 [INFO] [stderr] Checking cpufeatures v0.2.17 [INFO] [stderr] Checking zeroize v1.8.2 [INFO] [stderr] Compiling proc-macro2-diagnostics v0.10.1 [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Checking equivalent v1.0.2 [INFO] [stderr] Compiling futures-sink v0.3.31 [INFO] [stderr] Compiling yansi v1.0.1 [INFO] [stderr] Compiling litemap v0.8.1 [INFO] [stderr] Compiling serde_json v1.0.148 [INFO] [stderr] Compiling writeable v0.6.2 [INFO] [stderr] Checking memchr v2.7.6 [INFO] [stderr] Compiling getrandom v0.2.16 [INFO] [stderr] Compiling quote v1.0.42 [INFO] [stderr] Compiling mio v1.1.1 [INFO] [stderr] Compiling syn v2.0.111 [INFO] [stderr] Compiling socket2 v0.6.1 [INFO] [stderr] Compiling futures-task v0.3.31 [INFO] [stderr] Compiling slab v0.4.11 [INFO] [stderr] Compiling pin-utils v0.1.0 [INFO] [stderr] Compiling percent-encoding v2.3.2 [INFO] [stderr] Checking hashbrown v0.16.1 [INFO] [stderr] Compiling rustls v0.23.35 [INFO] [stderr] Compiling futures-io v0.3.31 [INFO] [stderr] Compiling futures-util v0.3.31 [INFO] [stderr] Checking tracing-core v0.1.36 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Compiling icu_properties_data v2.1.2 [INFO] [stderr] Compiling icu_normalizer_data v2.1.1 [INFO] [stderr] Compiling tokio v1.48.0 [INFO] [stderr] Checking log v0.4.29 [INFO] [stderr] Compiling libm v0.2.15 [INFO] [stderr] Compiling rustls-pki-types v1.13.2 [INFO] [stderr] Checking errno v0.3.14 [INFO] [stderr] Checking signal-hook-registry v1.4.8 [INFO] [stderr] Compiling crypto-common v0.1.7 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Compiling block-buffer v0.10.4 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Checking inout v0.1.4 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Compiling digest v0.10.7 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling bitflags v2.10.0 [INFO] [stderr] Checking base64ct v1.8.1 [INFO] [stderr] Checking cipher v0.4.4 [INFO] [stderr] Compiling untrusted v0.9.0 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Compiling parking_lot_core v0.9.12 [INFO] [stderr] Compiling utf8_iter v1.0.4 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking indexmap v2.12.1 [INFO] [stderr] Compiling tinyvec_macros v0.1.1 [INFO] [stderr] Compiling foldhash v0.1.5 [INFO] [stderr] Compiling allocator-api2 v0.2.21 [INFO] [stderr] Checking spin v0.9.8 [INFO] [stderr] Checking lock_api v0.4.14 [INFO] [stderr] Compiling tinyvec v1.10.0 [INFO] [stderr] Compiling concurrent-queue v2.5.0 [INFO] [stderr] Compiling getrandom v0.3.4 [INFO] [stderr] Compiling const_format_proc_macros v0.2.34 [INFO] [stderr] Compiling hashbrown v0.15.5 [INFO] [stderr] Checking universal-hash v0.5.1 [INFO] [stderr] Compiling webpki-roots v1.0.4 [INFO] [stderr] Compiling form_urlencoded v1.2.2 [INFO] [stderr] Compiling thiserror v2.0.17 [INFO] [stderr] Checking fnv v1.0.7 [INFO] [stderr] Compiling crc-catalog v2.4.0 [INFO] [stderr] Checking base64 v0.22.1 [INFO] [stderr] Compiling powerfmt v0.2.0 [INFO] [stderr] Checking opaque-debug v0.3.1 [INFO] [stderr] Compiling parking v2.2.1 [INFO] [stderr] Compiling http v0.2.12 [INFO] [stderr] Checking polyval v0.6.2 [INFO] [stderr] Compiling event-listener v5.4.1 [INFO] [stderr] Compiling crc v3.4.0 [INFO] [stderr] Compiling deranged v0.5.5 [INFO] [stderr] Compiling hashlink v0.10.0 [INFO] [stderr] Compiling webpki-roots v0.26.11 [INFO] [stderr] Compiling unicode-normalization v0.1.25 [INFO] [stderr] Compiling crossbeam-queue v0.3.12 [INFO] [stderr] Checking hkdf v0.12.4 [INFO] [stderr] Checking pem-rfc7468 v0.7.0 [INFO] [stderr] Checking is-terminal v0.4.17 [INFO] [stderr] Compiling httparse v1.10.1 [INFO] [stderr] Compiling uncased v0.9.10 [INFO] [stderr] Compiling cookie v0.18.1 [INFO] [stderr] Compiling try-lock v0.2.5 [INFO] [stderr] Compiling unicode-bidi v0.3.18 [INFO] [stderr] Compiling unicode-properties v0.1.4 [INFO] [stderr] Compiling want v0.3.1 [INFO] [stderr] Checking der v0.7.10 [INFO] [stderr] Compiling atoi v2.0.0 [INFO] [stderr] Compiling stringprep v0.1.5 [INFO] [stderr] Compiling http-body v0.4.6 [INFO] [stderr] Checking ghash v0.5.1 [INFO] [stderr] Checking lazy_static v1.5.0 [INFO] [stderr] Checking ctr v0.9.2 [INFO] [stderr] Checking aes v0.8.4 [INFO] [stderr] Compiling ref-cast v1.0.25 [INFO] [stderr] Compiling md-5 v0.10.6 [INFO] [stderr] Compiling tokio-stream v0.1.17 [INFO] [stderr] Compiling time v0.3.44 [INFO] [stderr] Checking aead v0.5.2 [INFO] [stderr] Compiling winnow v0.7.14 [INFO] [stderr] Compiling socket2 v0.5.10 [INFO] [stderr] Compiling byteorder v1.5.0 [INFO] [stderr] Checking time-core v0.1.6 [INFO] [stderr] Compiling tower-service v0.3.3 [INFO] [stderr] Compiling httpdate v1.0.3 [INFO] [stderr] Compiling dotenvy v0.15.7 [INFO] [stderr] Checking num-conv v0.1.0 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling devise_core v0.4.2 [INFO] [stderr] Compiling whoami v1.6.1 [INFO] [stderr] Checking inlinable_string v0.1.15 [INFO] [stderr] Checking toml_write v0.1.2 [INFO] [stderr] Compiling rustix v1.1.3 [INFO] [stderr] Checking spki v0.7.3 [INFO] [stderr] Checking aes-gcm v0.10.3 [INFO] [stderr] Compiling futures v0.3.31 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Compiling stable-pattern v0.1.0 [INFO] [stderr] Compiling figment v0.10.19 [INFO] [stderr] Compiling multer v3.1.0 [INFO] [stderr] Compiling rustls-webpki v0.103.8 [INFO] [stderr] Compiling num-bigint-dig v0.8.6 [INFO] [stderr] Checking linux-raw-sys v0.11.0 [INFO] [stderr] Compiling state v0.6.0 [INFO] [stderr] Checking regex-syntax v0.8.8 [INFO] [stderr] Checking unicode-ident v1.0.22 [INFO] [stderr] Compiling crc32fast v1.5.0 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking pkcs8 v0.10.2 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking pbkdf2 v0.12.2 [INFO] [stderr] Checking password-hash v0.5.0 [INFO] [stderr] Checking http v1.4.0 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Compiling rocket v0.5.1 [INFO] [stderr] Checking simd-adler32 v0.3.8 [INFO] [stderr] Checking mime v0.3.17 [INFO] [stderr] Checking fastrand v2.3.0 [INFO] [stderr] Checking adler2 v2.0.1 [INFO] [stderr] Checking hex v0.4.3 [INFO] [stderr] Checking home v0.5.12 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Compiling anyhow v1.0.100 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking pkcs1 v0.7.5 [INFO] [stderr] Checking blowfish v0.9.1 [INFO] [stderr] Checking sharded-slab v0.1.7 [INFO] [stderr] Compiling const_format v0.2.35 [INFO] [stderr] Checking blake2 v0.10.6 [INFO] [stderr] Checking signature v2.2.0 [INFO] [stderr] Checking salsa20 v0.10.2 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tracing-attributes v0.1.31 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Compiling pear_codegen v0.2.9 [INFO] [stderr] Compiling ref-cast-impl v1.0.25 [INFO] [stderr] Compiling devise_codegen v0.4.2 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Compiling async-stream-impl v0.3.6 [INFO] [stderr] Checking tempfile v3.24.0 [INFO] [stderr] Compiling async-trait v0.1.89 [INFO] [stderr] Checking num_cpus v1.17.0 [INFO] [stderr] Compiling devise v0.4.2 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Compiling pear v0.2.9 [INFO] [stderr] Checking thread_local v1.1.9 [INFO] [stderr] Checking atomic v0.5.3 [INFO] [stderr] Checking nu-ansi-term v0.50.3 [INFO] [stderr] Checking async-stream v0.3.6 [INFO] [stderr] Checking binascii v0.1.4 [INFO] [stderr] Checking argon2 v0.5.3 [INFO] [stderr] Checking flate2 v1.1.5 [INFO] [stderr] Compiling zerofrom v0.1.6 [INFO] [stderr] Compiling yoke v0.8.1 [INFO] [stderr] Checking scrypt v0.11.0 [INFO] [stderr] Compiling mailserver-web-macro v0.1.0 (/opt/rustwide/workdir/macro) [INFO] [stderr] Compiling zerovec v0.11.5 [INFO] [stderr] Compiling zerotrie v0.2.3 [INFO] [stderr] Checking bcrypt-pbkdf v0.10.0 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Compiling tracing v0.1.44 [INFO] [stderr] Compiling hyper v0.14.32 [INFO] [stderr] Compiling tinystr v0.8.2 [INFO] [stderr] Compiling potential_utf v0.1.4 [INFO] [stderr] Compiling icu_collections v2.1.1 [INFO] [stderr] Compiling icu_locale_core v2.1.1 [INFO] [stderr] Checking matchers v0.2.0 [INFO] [stderr] Compiling icu_provider v2.1.1 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Checking serde_spanned v0.6.9 [INFO] [stderr] Checking toml_datetime v0.6.11 [INFO] [stderr] Checking ubyte v0.10.4 [INFO] [stderr] Compiling basic-toml v0.1.10 [INFO] [stderr] Compiling icu_properties v2.1.2 [INFO] [stderr] Compiling askama_parser v0.15.1 [INFO] [stderr] Checking toml_edit v0.22.27 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking tracing-subscriber v0.3.22 [INFO] [stderr] Checking parking_lot v0.12.5 [INFO] [stderr] Checking futures-intrusive v0.5.0 [INFO] [stderr] Compiling rocket_http v0.5.1 [INFO] [stderr] Compiling idna_adapter v1.2.1 [INFO] [stderr] Compiling idna v1.1.0 [INFO] [stderr] Checking rsa v0.9.9 [INFO] [stderr] Checking tokio-util v0.7.17 [INFO] [stderr] Compiling url v2.5.7 [INFO] [stderr] Checking h2 v0.3.27 [INFO] [stderr] Compiling sqlx-core v0.8.6 [INFO] [stderr] Checking toml v0.8.23 [INFO] [stderr] Compiling rocket_codegen v0.5.1 [INFO] [stderr] Compiling askama_derive v0.15.1 [INFO] [stderr] Compiling sqlx-postgres v0.8.6 [INFO] [stderr] Compiling askama_macros v0.15.1 [INFO] [stderr] Checking askama v0.15.1 [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 mailserver-web v0.1.23 (/opt/rustwide/workdir/app) [INFO] [stdout] warning: method `override_content_type` is never used [INFO] [stdout] --> app/src/rocket/response.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl Return { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 20 | pub fn override_content_type(&mut self, content_type: rocket::http::ContentType) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | .await.map_err(|err|Error::GetPassword(err))?.password; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::GetPassword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:77:77 [INFO] [stdout] | [INFO] [stdout] 77 | Ok(argon.hash_password(password.as_bytes(), salt.as_salt()).map_err(|err|Error::HashNewPassword(err))?.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::HashNewPassword` [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: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:86:53 [INFO] [stdout] | [INFO] [stdout] 86 | .fetch_optional(&db).await.map(|v|v.map(|v|v.id).flatten()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:90:53 [INFO] [stdout] | [INFO] [stdout] 90 | .fetch_optional(&db).await.map(|v|v.map(|v|v.id).flatten()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused "map closure" when calling `Result::map_or_else` value [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:103:5 [INFO] [stdout] | [INFO] [stdout] 103 | / tokio::task::spawn_blocking(move ||{ [INFO] [stdout] 104 | | let password_hash = password_hash; [INFO] [stdout] 105 | | let password_hash = password_hash::PasswordHash::parse(password_hash.as_str(), encoding) [INFO] [stdout] 106 | | .map_err(|err|Error::ParsePassword(err))?; [INFO] [stdout] ... | [INFO] [stdout] 150 | | }).await.map_or_else(|e|Err(Error::VerifyPasswordPanic(e)), |v|v) [INFO] [stdout] | |_____________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_result_map_or_else [INFO] [stdout] = note: `#[warn(clippy::unnecessary_result_map_or_else)]` on by default [INFO] [stdout] help: consider using `unwrap_or_else` [INFO] [stdout] | [INFO] [stdout] 103 ~ tokio::task::spawn_blocking(move ||{ [INFO] [stdout] 104 + let password_hash = password_hash; [INFO] [stdout] 105 + let password_hash = password_hash::PasswordHash::parse(password_hash.as_str(), encoding) [INFO] [stdout] 106 + .map_err(|err|Error::ParsePassword(err))?; [INFO] [stdout] 107 + let password_hash = &password_hash; [INFO] [stdout] 108 + log::debug!("decoded Password-Hash: {password_hash:?}"); [INFO] [stdout] 109 + [INFO] [stdout] 110 + use password_hash::PasswordVerifier; [INFO] [stdout] 111 + match Algorithms::try_from(password_hash.algorithm) { [INFO] [stdout] 112 + Ok(Algorithms::Argon(algorithm)) => { [INFO] [stdout] 113 + log::debug!("argon algorithm: {algorithm:?}"); [INFO] [stdout] 114 + [INFO] [stdout] 115 + let params = argon2::Params::try_from(password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] 116 + log::debug!("argon params: {params:?}"); [INFO] [stdout] 117 + [INFO] [stdout] 118 + let version = password_hash.version [INFO] [stdout] 119 + .map(argon2::Version::try_from) [INFO] [stdout] 120 + .transpose().map_err(|e|Error::VerifyPassword(e.into()))? [INFO] [stdout] 121 + .unwrap_or_default(); [INFO] [stdout] 122 + log::debug!("argon version: {version:?}"); [INFO] [stdout] 123 + [INFO] [stdout] 124 + let needs_rehash = algorithm != ARGON2_ALGO || version != ARGON2_VERSION || params != ARGON2_PARAMS; [INFO] [stdout] 125 + argon2::Argon2::new(algorithm, version, params).verify_password(password.as_bytes(), password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] 126 + Ok(needs_rehash) [INFO] [stdout] 127 + } [INFO] [stdout] 128 + Ok(Algorithms::Bcrypt(_)) => { [INFO] [stdout] 129 + let params = super::bcrypt::BcryptParams::try_from(password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] 130 + log::debug!("bcrypt params: {params:?}"); [INFO] [stdout] 131 + super::bcrypt::Bcrypt::new(params).verify_password(password.as_bytes(), password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] 132 + Ok(true) [INFO] [stdout] 133 + } [INFO] [stdout] 134 + #[cfg(feature = "sha-crypt")] [INFO] [stdout] 135 + Ok(Algorithms::Sha256) => { [INFO] [stdout] 136 + let params = super::sha::Sha256Params::try_from(password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] 137 + log::debug!("sha256 params: {params:?}"); [INFO] [stdout] 138 + super::sha::Sha256::new(params).verify_password(password.as_bytes(), password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] 139 + Ok(true) [INFO] [stdout] 140 + } [INFO] [stdout] 141 + #[cfg(feature = "sha-crypt")] [INFO] [stdout] 142 + Ok(Algorithms::Sha512) => { [INFO] [stdout] 143 + let params = super::sha::Sha512Params::try_from(password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] 144 + log::debug!("sha512 params: {params:?}"); [INFO] [stdout] 145 + super::sha::Sha512::new(params).verify_password(password.as_bytes(), password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] 146 + Ok(true) [INFO] [stdout] 147 + } [INFO] [stdout] 148 + Err(_) => Err(Error::VerifyPassword(password_hash::Error::Algorithm)), [INFO] [stdout] 149 + } [INFO] [stdout] 150 + }).await.unwrap_or_else(|e|Err(Error::VerifyPasswordPanic(e))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:106:18 [INFO] [stdout] | [INFO] [stdout] 106 | .map_err(|err|Error::ParsePassword(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::ParsePassword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:115:74 [INFO] [stdout] | [INFO] [stdout] 115 | let params = argon2::Params::try_from(password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::VerifyPassword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:125:121 [INFO] [stdout] | [INFO] [stdout] 125 | ...).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::VerifyPassword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:129:87 [INFO] [stdout] | [INFO] [stdout] 129 | let params = super::bcrypt::BcryptParams::try_from(password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::VerifyPassword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:131:108 [INFO] [stdout] | [INFO] [stdout] 131 | ...).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::VerifyPassword` [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: slow zero-filling initialization [INFO] [stdout] --> app/src/rocket/auth/bcrypt.rs:73:23 [INFO] [stdout] | [INFO] [stdout] 73 | let mut out = Vec::with_capacity(params.output_length); [INFO] [stdout] | _______________________^ [INFO] [stdout] 74 | | out.resize(params.output_length, 0); [INFO] [stdout] | |___________________________________________^ help: consider replacing this with: `vec![0; params.output_length]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] = note: `#[warn(clippy::slow_vector_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `override_content_type` is never used [INFO] [stdout] --> app/src/rocket/response.rs:20:12 [INFO] [stdout] | [INFO] [stdout] 11 | impl Return { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 20 | pub fn override_content_type(&mut self, content_type: rocket::http::ContentType) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> app/src/rocket/auth/bcrypt.rs:90:23 [INFO] [stdout] | [INFO] [stdout] 90 | let mut out = Vec::with_capacity(self.params.output_length); [INFO] [stdout] | _______________________^ [INFO] [stdout] 91 | | out.resize(self.params.output_length, 0); [INFO] [stdout] | |________________________________________________^ help: consider replacing this with: `vec![0; self.params.output_length]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | .await.map_err(|err|Error::GetPassword(err))?.password; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::GetPassword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:77:77 [INFO] [stdout] | [INFO] [stdout] 77 | Ok(argon.hash_password(password.as_bytes(), salt.as_salt()).map_err(|err|Error::HashNewPassword(err))?.to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::HashNewPassword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> app/src/rocket/auth/session.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | / match cookies.get_private("email") { [INFO] [stdout] 44 | | Some(cookie) => cookies.remove_private(cookie), [INFO] [stdout] 45 | | None => {}, [INFO] [stdout] 46 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(cookie) = cookies.get_private("email") { cookies.remove_private(cookie) }` [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: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:86:53 [INFO] [stdout] | [INFO] [stdout] 86 | .fetch_optional(&db).await.map(|v|v.map(|v|v.id).flatten()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:90:53 [INFO] [stdout] | [INFO] [stdout] 90 | .fetch_optional(&db).await.map(|v|v.map(|v|v.id).flatten()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused "map closure" when calling `Result::map_or_else` value [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:103:5 [INFO] [stdout] | [INFO] [stdout] 103 | / tokio::task::spawn_blocking(move ||{ [INFO] [stdout] 104 | | let password_hash = password_hash; [INFO] [stdout] 105 | | let password_hash = password_hash::PasswordHash::parse(password_hash.as_str(), encoding) [INFO] [stdout] 106 | | .map_err(|err|Error::ParsePassword(err))?; [INFO] [stdout] ... | [INFO] [stdout] 150 | | }).await.map_or_else(|e|Err(Error::VerifyPasswordPanic(e)), |v|v) [INFO] [stdout] | |_____________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_result_map_or_else [INFO] [stdout] = note: `#[warn(clippy::unnecessary_result_map_or_else)]` on by default [INFO] [stdout] help: consider using `unwrap_or_else` [INFO] [stdout] | [INFO] [stdout] 103 ~ tokio::task::spawn_blocking(move ||{ [INFO] [stdout] 104 + let password_hash = password_hash; [INFO] [stdout] 105 + let password_hash = password_hash::PasswordHash::parse(password_hash.as_str(), encoding) [INFO] [stdout] 106 + .map_err(|err|Error::ParsePassword(err))?; [INFO] [stdout] 107 + let password_hash = &password_hash; [INFO] [stdout] 108 + log::debug!("decoded Password-Hash: {password_hash:?}"); [INFO] [stdout] 109 + [INFO] [stdout] 110 + use password_hash::PasswordVerifier; [INFO] [stdout] 111 + match Algorithms::try_from(password_hash.algorithm) { [INFO] [stdout] 112 + Ok(Algorithms::Argon(algorithm)) => { [INFO] [stdout] 113 + log::debug!("argon algorithm: {algorithm:?}"); [INFO] [stdout] 114 + [INFO] [stdout] 115 + let params = argon2::Params::try_from(password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] 116 + log::debug!("argon params: {params:?}"); [INFO] [stdout] 117 + [INFO] [stdout] 118 + let version = password_hash.version [INFO] [stdout] 119 + .map(argon2::Version::try_from) [INFO] [stdout] 120 + .transpose().map_err(|e|Error::VerifyPassword(e.into()))? [INFO] [stdout] 121 + .unwrap_or_default(); [INFO] [stdout] 122 + log::debug!("argon version: {version:?}"); [INFO] [stdout] 123 + [INFO] [stdout] 124 + let needs_rehash = algorithm != ARGON2_ALGO || version != ARGON2_VERSION || params != ARGON2_PARAMS; [INFO] [stdout] 125 + argon2::Argon2::new(algorithm, version, params).verify_password(password.as_bytes(), password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] 126 + Ok(needs_rehash) [INFO] [stdout] 127 + } [INFO] [stdout] 128 + Ok(Algorithms::Bcrypt(_)) => { [INFO] [stdout] 129 + let params = super::bcrypt::BcryptParams::try_from(password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] 130 + log::debug!("bcrypt params: {params:?}"); [INFO] [stdout] 131 + super::bcrypt::Bcrypt::new(params).verify_password(password.as_bytes(), password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] 132 + Ok(true) [INFO] [stdout] 133 + } [INFO] [stdout] 134 + #[cfg(feature = "sha-crypt")] [INFO] [stdout] 135 + Ok(Algorithms::Sha256) => { [INFO] [stdout] 136 + let params = super::sha::Sha256Params::try_from(password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] 137 + log::debug!("sha256 params: {params:?}"); [INFO] [stdout] 138 + super::sha::Sha256::new(params).verify_password(password.as_bytes(), password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] 139 + Ok(true) [INFO] [stdout] 140 + } [INFO] [stdout] 141 + #[cfg(feature = "sha-crypt")] [INFO] [stdout] 142 + Ok(Algorithms::Sha512) => { [INFO] [stdout] 143 + let params = super::sha::Sha512Params::try_from(password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] 144 + log::debug!("sha512 params: {params:?}"); [INFO] [stdout] 145 + super::sha::Sha512::new(params).verify_password(password.as_bytes(), password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] 146 + Ok(true) [INFO] [stdout] 147 + } [INFO] [stdout] 148 + Err(_) => Err(Error::VerifyPassword(password_hash::Error::Algorithm)), [INFO] [stdout] 149 + } [INFO] [stdout] 150 + }).await.unwrap_or_else(|e|Err(Error::VerifyPasswordPanic(e))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:106:18 [INFO] [stdout] | [INFO] [stdout] 106 | .map_err(|err|Error::ParsePassword(err))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::ParsePassword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:115:74 [INFO] [stdout] | [INFO] [stdout] 115 | let params = argon2::Params::try_from(password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::VerifyPassword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:125:121 [INFO] [stdout] | [INFO] [stdout] 125 | ...).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::VerifyPassword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:129:87 [INFO] [stdout] | [INFO] [stdout] 129 | let params = super::bcrypt::BcryptParams::try_from(password_hash).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::VerifyPassword` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> app/src/rocket/auth/check_password.rs:131:108 [INFO] [stdout] | [INFO] [stdout] 131 | ...).map_err(|e|Error::VerifyPassword(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `Error::VerifyPassword` [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: slow zero-filling initialization [INFO] [stdout] --> app/src/rocket/auth/bcrypt.rs:73:23 [INFO] [stdout] | [INFO] [stdout] 73 | let mut out = Vec::with_capacity(params.output_length); [INFO] [stdout] | _______________________^ [INFO] [stdout] 74 | | out.resize(params.output_length, 0); [INFO] [stdout] | |___________________________________________^ help: consider replacing this with: `vec![0; params.output_length]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [INFO] [stdout] = note: `#[warn(clippy::slow_vector_initialization)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: slow zero-filling initialization [INFO] [stdout] --> app/src/rocket/auth/bcrypt.rs:90:23 [INFO] [stdout] | [INFO] [stdout] 90 | let mut out = Vec::with_capacity(self.params.output_length); [INFO] [stdout] | _______________________^ [INFO] [stdout] 91 | | out.resize(self.params.output_length, 0); [INFO] [stdout] | |________________________________________________^ help: consider replacing this with: `vec![0; self.params.output_length]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization [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] --> app/src/rocket/auth/session.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | / match cookies.get_private("email") { [INFO] [stdout] 44 | | Some(cookie) => cookies.remove_private(cookie), [INFO] [stdout] 45 | | None => {}, [INFO] [stdout] 46 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(cookie) = cookies.get_private("email") { cookies.remove_private(cookie) }` [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: this function has too many arguments (23/7) [INFO] [stdout] --> app/src/rocket/auth/permissions.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | mailserver_web_macro::query!(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] = note: this warning originates in the macro `mailserver_web_macro::query` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (23/7) [INFO] [stdout] --> app/src/rocket/auth/permissions.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | mailserver_web_macro::query!(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] = note: this warning originates in the macro `mailserver_web_macro::query` (in Nightly builds, run with -Z macro-backtrace for more info) [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] --> app/src/rocket/response.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | / match self { [INFO] [stdout] 22 | | Return::Content((_, content)) => content.content_type = content_type, [INFO] [stdout] 23 | | _ => {}, [INFO] [stdout] 24 | | } [INFO] [stdout] | |_________^ help: try: `if let Return::Content((_, content)) = self { content.content_type = content_type }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [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] --> app/src/rocket/api/auth/logout.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | / match cookies.get_private("email") { [INFO] [stdout] 4 | | Some(v) => cookies.remove_private(v), [INFO] [stdout] 5 | | None => {}, [INFO] [stdout] 6 | | } [INFO] [stdout] | |_____^ help: try: `if let Some(v) = cookies.get_private("email") { cookies.remove_private(v) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [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] --> app/src/rocket/response.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | / match self { [INFO] [stdout] 22 | | Return::Content((_, content)) => content.content_type = content_type, [INFO] [stdout] 23 | | _ => {}, [INFO] [stdout] 24 | | } [INFO] [stdout] | |_________^ help: try: `if let Return::Content((_, content)) = self { content.content_type = content_type }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [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] --> app/src/rocket/api/auth/logout.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | / match cookies.get_private("email") { [INFO] [stdout] 4 | | Some(v) => cookies.remove_private(v), [INFO] [stdout] 5 | | None => {}, [INFO] [stdout] 6 | | } [INFO] [stdout] | |_____^ help: try: `if let Some(v) = cookies.get_private("email") { cookies.remove_private(v) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_accounts.rs:74:20 [INFO] [stdout] | [INFO] [stdout] 74 | if not_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!not_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_accounts.rs:77:20 [INFO] [stdout] | [INFO] [stdout] 77 | if extra_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!extra_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_accounts.rs:110:8 [INFO] [stdout] | [INFO] [stdout] 110 | if !permissions.admin() && !(permissions.delete_disabled() && permissions.list_deleted()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(permissions.admin() || permissions.delete_disabled() && permissions.list_deleted())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_accounts.rs:131:20 [INFO] [stdout] | [INFO] [stdout] 131 | if not_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!not_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_accounts.rs:134:20 [INFO] [stdout] | [INFO] [stdout] 134 | if extra_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!extra_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_accounts.rs:165:8 [INFO] [stdout] | [INFO] [stdout] 165 | if !permissions.admin() && !(permissions.undelete() && permissions.list_accounts()){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(permissions.admin() || permissions.undelete() && permissions.list_accounts())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_accounts.rs:186:20 [INFO] [stdout] | [INFO] [stdout] 186 | if not_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!not_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_accounts.rs:189:20 [INFO] [stdout] | [INFO] [stdout] 189 | if extra_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!extra_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_accounts.rs:74:20 [INFO] [stdout] | [INFO] [stdout] 74 | if not_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!not_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_accounts.rs:77:20 [INFO] [stdout] | [INFO] [stdout] 77 | if extra_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!extra_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_accounts.rs:110:8 [INFO] [stdout] | [INFO] [stdout] 110 | if !permissions.admin() && !(permissions.delete_disabled() && permissions.list_deleted()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(permissions.admin() || permissions.delete_disabled() && permissions.list_deleted())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_accounts.rs:131:20 [INFO] [stdout] | [INFO] [stdout] 131 | if not_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!not_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_accounts.rs:134:20 [INFO] [stdout] | [INFO] [stdout] 134 | if extra_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!extra_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_accounts.rs:165:8 [INFO] [stdout] | [INFO] [stdout] 165 | if !permissions.admin() && !(permissions.undelete() && permissions.list_accounts()){ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(permissions.admin() || permissions.undelete() && permissions.list_accounts())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_accounts.rs:186:20 [INFO] [stdout] | [INFO] [stdout] 186 | if not_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!not_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_accounts.rs:189:20 [INFO] [stdout] | [INFO] [stdout] 189 | if extra_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!extra_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/api/admin/domain/create_account.rs:74:59 [INFO] [stdout] | [INFO] [stdout] 74 | .fetch_optional(&mut *transaction).await.map(|v|v.map(|v|v.id).flatten()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/api/admin/domain/update_account.rs:59:47 [INFO] [stdout] | [INFO] [stdout] 59 | .fetch_optional(&pool).await.map(|v|v.map(|v|v.id).flatten()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/api/admin/domain/create_account.rs:74:59 [INFO] [stdout] | [INFO] [stdout] 74 | .fetch_optional(&mut *transaction).await.map(|v|v.map(|v|v.id).flatten()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [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] --> app/src/rocket/api/admin/domain/update_account.rs:148:5 [INFO] [stdout] | [INFO] [stdout] 148 | / match set_password(pool, Err((user_name, permission.domain_id())), session.get_user_id(), data.into_inner().password).await { [INFO] [stdout] 149 | | Err(err) => { [INFO] [stdout] 150 | | log::error!("Error setting password: {err}"); [INFO] [stdout] 151 | | let mut err = admin_domain_account_get_impl(Some(session), domain, user_name, Some("There was an error setting the ac... [INFO] [stdout] ... | [INFO] [stdout] 155 | | Ok(()) => {}, [INFO] [stdout] 156 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 148 ~ if let Err(err) = set_password(pool, Err((user_name, permission.domain_id())), session.get_user_id(), data.into_inner().password).await { [INFO] [stdout] 149 + log::error!("Error setting password: {err}"); [INFO] [stdout] 150 + let mut err = admin_domain_account_get_impl(Some(session), domain, user_name, Some("There was an error setting the account Password.")).await; [INFO] [stdout] 151 + err.override_status(rocket::http::Status::InternalServerError); [INFO] [stdout] 152 + return err; [INFO] [stdout] 153 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/api/admin/domain/update_account.rs:59:47 [INFO] [stdout] | [INFO] [stdout] 59 | .fetch_optional(&pool).await.map(|v|v.map(|v|v.id).flatten()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/api/admin/domain/create_subdomain.rs:47:44 [INFO] [stdout] | [INFO] [stdout] 47 | ).fetch_optional(&pool).await.map(|v|v.map(|v|v.id).flatten()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [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] --> app/src/rocket/api/admin/domain/update_account.rs:148:5 [INFO] [stdout] | [INFO] [stdout] 148 | / match set_password(pool, Err((user_name, permission.domain_id())), session.get_user_id(), data.into_inner().password).await { [INFO] [stdout] 149 | | Err(err) => { [INFO] [stdout] 150 | | log::error!("Error setting password: {err}"); [INFO] [stdout] 151 | | let mut err = admin_domain_account_get_impl(Some(session), domain, user_name, Some("There was an error setting the ac... [INFO] [stdout] ... | [INFO] [stdout] 155 | | Ok(()) => {}, [INFO] [stdout] 156 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 148 ~ if let Err(err) = set_password(pool, Err((user_name, permission.domain_id())), session.get_user_id(), data.into_inner().password).await { [INFO] [stdout] 149 + log::error!("Error setting password: {err}"); [INFO] [stdout] 150 + let mut err = admin_domain_account_get_impl(Some(session), domain, user_name, Some("There was an error setting the account Password.")).await; [INFO] [stdout] 151 + err.override_status(rocket::http::Status::InternalServerError); [INFO] [stdout] 152 + return err; [INFO] [stdout] 153 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_subdomains.rs:58:20 [INFO] [stdout] | [INFO] [stdout] 58 | if not_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!not_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_subdomains.rs:61:20 [INFO] [stdout] | [INFO] [stdout] 61 | if extra_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!extra_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_subdomains.rs:95:8 [INFO] [stdout] | [INFO] [stdout] 95 | if !permissions.admin() && !(permissions.delete_disabled() && permissions.list_subdomain()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(permissions.admin() || permissions.delete_disabled() && permissions.list_subdomain())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_subdomains.rs:115:20 [INFO] [stdout] | [INFO] [stdout] 115 | if not_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!not_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_subdomains.rs:118:20 [INFO] [stdout] | [INFO] [stdout] 118 | if extra_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!extra_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_subdomains.rs:152:8 [INFO] [stdout] | [INFO] [stdout] 152 | if !permissions.admin() && !(permissions.undelete() && permissions.list_subdomain()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(permissions.admin() || permissions.undelete() && permissions.list_subdomain())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_subdomains.rs:172:20 [INFO] [stdout] | [INFO] [stdout] 172 | if not_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!not_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_subdomains.rs:175:20 [INFO] [stdout] | [INFO] [stdout] 175 | if extra_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!extra_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/api/admin/domain/create_subdomain.rs:47:44 [INFO] [stdout] | [INFO] [stdout] 47 | ).fetch_optional(&pool).await.map(|v|v.map(|v|v.id).flatten()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/api/admin/domain/update_domain.rs:48:43 [INFO] [stdout] | [INFO] [stdout] 48 | .fetch_optional(&pool).await.map(|v|v.map(|v|v.id).flatten()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_subdomains.rs:58:20 [INFO] [stdout] | [INFO] [stdout] 58 | if not_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!not_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_subdomains.rs:61:20 [INFO] [stdout] | [INFO] [stdout] 61 | if extra_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!extra_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/api/admin/domain/update_domain.rs:86:47 [INFO] [stdout] | [INFO] [stdout] 86 | .fetch_optional(&pool).await.map(|v|v.map(|v|v.id).flatten()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_subdomains.rs:95:8 [INFO] [stdout] | [INFO] [stdout] 95 | if !permissions.admin() && !(permissions.delete_disabled() && permissions.list_subdomain()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(permissions.admin() || permissions.delete_disabled() && permissions.list_subdomain())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_subdomains.rs:115:20 [INFO] [stdout] | [INFO] [stdout] 115 | if not_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!not_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_subdomains.rs:118:20 [INFO] [stdout] | [INFO] [stdout] 118 | if extra_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!extra_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_subdomains.rs:152:8 [INFO] [stdout] | [INFO] [stdout] 152 | if !permissions.admin() && !(permissions.undelete() && permissions.list_subdomain()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(permissions.admin() || permissions.undelete() && permissions.list_subdomain())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_subdomains.rs:172:20 [INFO] [stdout] | [INFO] [stdout] 172 | if not_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!not_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_subdomains.rs:175:20 [INFO] [stdout] | [INFO] [stdout] 175 | if extra_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!extra_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/api/admin/domain/change_owner.rs:36:47 [INFO] [stdout] | [INFO] [stdout] 36 | .fetch_optional(&pool).await.map(|v|v.map(|v|v.id).flatten()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/api/admin/domain/update_domain.rs:48:43 [INFO] [stdout] | [INFO] [stdout] 48 | .fetch_optional(&pool).await.map(|v|v.map(|v|v.id).flatten()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/api/admin/domain/create_alias.rs:50:43 [INFO] [stdout] | [INFO] [stdout] 50 | .fetch_optional(&pool).await.map(|v|v.map(|v|v.id).flatten()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/api/admin/domain/update_domain.rs:86:47 [INFO] [stdout] | [INFO] [stdout] 86 | .fetch_optional(&pool).await.map(|v|v.map(|v|v.id).flatten()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/api/admin/domain/change_owner.rs:36:47 [INFO] [stdout] | [INFO] [stdout] 36 | .fetch_optional(&pool).await.map(|v|v.map(|v|v.id).flatten()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_alias.rs:76:20 [INFO] [stdout] | [INFO] [stdout] 76 | if not_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!not_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_alias.rs:79:20 [INFO] [stdout] | [INFO] [stdout] 79 | if extra_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!extra_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> app/src/rocket/content/admin/domain/accounts.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / if !permissions.admin() { [INFO] [stdout] 28 | | if [INFO] [stdout] 29 | | !permissions.view_domain() || [INFO] [stdout] 30 | | !permissions.list_accounts() [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [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] 27 ~ if !permissions.admin() [INFO] [stdout] 28 ~ && [INFO] [stdout] 29 ~ (!permissions.view_domain() || [INFO] [stdout] 30 ~ !permissions.list_accounts()) [INFO] [stdout] 31 | { [INFO] [stdout] 32 | return no_perm.into(); [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Option` [INFO] [stdout] --> app/src/rocket/api/admin/domain/create_alias.rs:50:43 [INFO] [stdout] | [INFO] [stdout] 50 | .fetch_optional(&pool).await.map(|v|v.map(|v|v.id).flatten()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|v|v.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> app/src/rocket/content/admin/domain/account.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / if !permissions.admin() { [INFO] [stdout] 28 | | if [INFO] [stdout] 29 | | !permissions.view_domain() || [INFO] [stdout] 30 | | !permissions.list_accounts() [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [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 !permissions.admin() [INFO] [stdout] 28 ~ && [INFO] [stdout] 29 ~ (!permissions.view_domain() || [INFO] [stdout] 30 ~ !permissions.list_accounts()) [INFO] [stdout] 31 | { [INFO] [stdout] 32 | return no_perm.into(); [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_alias.rs:76:20 [INFO] [stdout] | [INFO] [stdout] 76 | if not_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!not_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> app/src/rocket/api/admin/domain/delete_alias.rs:79:20 [INFO] [stdout] | [INFO] [stdout] 79 | if extra_recovered.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!extra_recovered.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> app/src/rocket/content/admin/domain/subdomains.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / if !permissions.admin() { [INFO] [stdout] 28 | | if [INFO] [stdout] 29 | | !permissions.view_domain() || [INFO] [stdout] 30 | | !permissions.list_subdomain() [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [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 !permissions.admin() [INFO] [stdout] 28 ~ && [INFO] [stdout] 29 ~ (!permissions.view_domain() || [INFO] [stdout] 30 ~ !permissions.list_subdomain()) [INFO] [stdout] 31 | { [INFO] [stdout] 32 | return UNAUTH(domain).into(); [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> app/src/rocket/content/admin/domain/accounts.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / if !permissions.admin() { [INFO] [stdout] 28 | | if [INFO] [stdout] 29 | | !permissions.view_domain() || [INFO] [stdout] 30 | | !permissions.list_accounts() [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [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] 27 ~ if !permissions.admin() [INFO] [stdout] 28 ~ && [INFO] [stdout] 29 ~ (!permissions.view_domain() || [INFO] [stdout] 30 ~ !permissions.list_accounts()) [INFO] [stdout] 31 | { [INFO] [stdout] 32 | return no_perm.into(); [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> app/src/rocket/content/admin/domain/subdomains.rs:54:32 [INFO] [stdout] | [INFO] [stdout] 54 | Ok(v) => v.into_iter().filter_map(|v|{ [INFO] [stdout] | ________________________________^ [INFO] [stdout] 55 | | let id = v.id; [INFO] [stdout] 56 | | let name = v.name; [INFO] [stdout] 57 | | let modify = format!(r#"Modify"#); [INFO] [stdout] 58 | | Some(format!(r#" app/src/rocket/content/admin/domain/permissions.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / if !permissions.admin() { [INFO] [stdout] 29 | | if [INFO] [stdout] 30 | | !permissions.view_domain() || [INFO] [stdout] 31 | | !permissions.list_accounts() [INFO] [stdout] ... | [INFO] [stdout] 35 | | } [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] 28 ~ if !permissions.admin() [INFO] [stdout] 29 ~ && [INFO] [stdout] 30 ~ (!permissions.view_domain() || [INFO] [stdout] 31 ~ !permissions.list_accounts()) [INFO] [stdout] 32 | { [INFO] [stdout] 33 | return no_perm.into(); [INFO] [stdout] 34 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> app/src/rocket/content/admin/domain/account.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / if !permissions.admin() { [INFO] [stdout] 28 | | if [INFO] [stdout] 29 | | !permissions.view_domain() || [INFO] [stdout] 30 | | !permissions.list_accounts() [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [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 !permissions.admin() [INFO] [stdout] 28 ~ && [INFO] [stdout] 29 ~ (!permissions.view_domain() || [INFO] [stdout] 30 ~ !permissions.list_accounts()) [INFO] [stdout] 31 | { [INFO] [stdout] 32 | return no_perm.into(); [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> app/src/rocket/content/admin/domain/aliases.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / if !permissions.admin() { [INFO] [stdout] 28 | | if [INFO] [stdout] 29 | | !permissions.view_domain() || [INFO] [stdout] 30 | | !permissions.list_alias() [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [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 !permissions.admin() [INFO] [stdout] 28 ~ && [INFO] [stdout] 29 ~ (!permissions.view_domain() || [INFO] [stdout] 30 ~ !permissions.list_alias()) [INFO] [stdout] 31 | { [INFO] [stdout] 32 | return no_perm.into(); [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> app/src/rocket/content/admin/domain/subdomains.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / if !permissions.admin() { [INFO] [stdout] 28 | | if [INFO] [stdout] 29 | | !permissions.view_domain() || [INFO] [stdout] 30 | | !permissions.list_subdomain() [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [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 !permissions.admin() [INFO] [stdout] 28 ~ && [INFO] [stdout] 29 ~ (!permissions.view_domain() || [INFO] [stdout] 30 ~ !permissions.list_subdomain()) [INFO] [stdout] 31 | { [INFO] [stdout] 32 | return UNAUTH(domain).into(); [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.filter_map(..)` can be written more simply using `.map(..)` [INFO] [stdout] --> app/src/rocket/content/admin/domain/subdomains.rs:54:32 [INFO] [stdout] | [INFO] [stdout] 54 | Ok(v) => v.into_iter().filter_map(|v|{ [INFO] [stdout] | ________________________________^ [INFO] [stdout] 55 | | let id = v.id; [INFO] [stdout] 56 | | let name = v.name; [INFO] [stdout] 57 | | let modify = format!(r#"Modify"#); [INFO] [stdout] 58 | | Some(format!(r#" app/src/rocket/content/admin/domain/permissions.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / if !permissions.admin() { [INFO] [stdout] 29 | | if [INFO] [stdout] 30 | | !permissions.view_domain() || [INFO] [stdout] 31 | | !permissions.list_accounts() [INFO] [stdout] ... | [INFO] [stdout] 35 | | } [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] 28 ~ if !permissions.admin() [INFO] [stdout] 29 ~ && [INFO] [stdout] 30 ~ (!permissions.view_domain() || [INFO] [stdout] 31 ~ !permissions.list_accounts()) [INFO] [stdout] 32 | { [INFO] [stdout] 33 | return no_perm.into(); [INFO] [stdout] 34 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> app/src/rocket/content/admin/domain/aliases.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / if !permissions.admin() { [INFO] [stdout] 28 | | if [INFO] [stdout] 29 | | !permissions.view_domain() || [INFO] [stdout] 30 | | !permissions.list_alias() [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [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 !permissions.admin() [INFO] [stdout] 28 ~ && [INFO] [stdout] 29 ~ (!permissions.view_domain() || [INFO] [stdout] 30 ~ !permissions.list_alias()) [INFO] [stdout] 31 | { [INFO] [stdout] 32 | return no_perm.into(); [INFO] [stdout] 33 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RSA` contains a capitalized acronym [INFO] [stdout] --> app/src/rocket/template/authenticated/domain/index.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | RSA(Vec) [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rsa` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> app/src/main.rs:12:28 [INFO] [stdout] | [INFO] [stdout] 12 | pub(crate) async fn get_db<'a>() -> sqlx::postgres::PgPool { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `RSA` contains a capitalized acronym [INFO] [stdout] --> app/src/rocket/template/authenticated/domain/index.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | RSA(Vec) [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Rsa` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> app/src/main.rs:12:28 [INFO] [stdout] | [INFO] [stdout] 12 | pub(crate) async fn get_db<'a>() -> sqlx::postgres::PgPool { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [optimized + debuginfo] target(s) in 2m 06s [INFO] running `Command { std: "docker" "inspect" "daa752cea7d8b8efa71aa122d572968d41fe0069ad7c76574e3bf6c2630bbd58", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "daa752cea7d8b8efa71aa122d572968d41fe0069ad7c76574e3bf6c2630bbd58", kill_on_drop: false }` [INFO] [stdout] daa752cea7d8b8efa71aa122d572968d41fe0069ad7c76574e3bf6c2630bbd58