[INFO] cloning repository https://github.com/Dheerkatharshini/clippy [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Dheerkatharshini/clippy" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDheerkatharshini%2Fclippy", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDheerkatharshini%2Fclippy'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] fd230938be1c0505a8af2f7f21f0b2bbaf8f183c [INFO] linting Dheerkatharshini/clippy against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FDheerkatharshini%2Fclippy" "/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/Dheerkatharshini/clippy [INFO] finished tweaking git repo https://github.com/Dheerkatharshini/clippy [INFO] tweaked toml for git repo https://github.com/Dheerkatharshini/clippy written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Dheerkatharshini/clippy 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/Dheerkatharshini/clippy 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] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2024 which implies `resolver = "3"` [INFO] [stderr] | [INFO] [stderr] = note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] = note: to use the edition 2024 resolver, specify `workspace.resolver = "3"` in the workspace root's manifest [INFO] [stderr] = note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded email-encoding v0.4.1 [INFO] [stderr] Downloaded quoted_printable v0.5.1 [INFO] [stderr] Downloaded os_pipe v1.2.2 [INFO] [stderr] Downloaded actix-multipart-derive v0.7.0 [INFO] [stderr] Downloaded wayland-protocols-misc v0.3.8 [INFO] [stderr] Downloaded objc2-core-location v0.3.1 [INFO] [stderr] Downloaded avif-serialize v0.8.4 [INFO] [stderr] Downloaded wayland-clipboard-listener v0.3.1 [INFO] [stderr] Downloaded ab_glyph v0.2.30 [INFO] [stderr] Downloaded actix-tls v3.4.0 [INFO] [stderr] Downloaded actix-multipart v0.7.2 [INFO] [stderr] Downloaded objc2-cloud-kit v0.3.1 [INFO] [stderr] Downloaded awc v3.7.0 [INFO] [stderr] Downloaded lettre v0.11.17 [INFO] [stderr] Downloaded objc2-core-image v0.3.1 [INFO] [stderr] Downloaded zune-jpeg v0.4.19 [INFO] [stderr] Downloaded image-webp v0.2.3 [INFO] [stderr] Downloaded reqwest v0.12.22 [INFO] [stderr] Downloaded clipboard-rs v0.3.0 [INFO] [stderr] Downloaded sysinfo v0.35.2 [INFO] [stderr] Downloaded objc2-core-data v0.3.1 [INFO] [stderr] Downloaded parse-size v1.1.0 [INFO] [stderr] Downloaded actix-web-httpauth v0.8.2 [INFO] [stderr] Downloaded actix-ws v0.3.0 [INFO] [stderr] Downloaded chumsky v0.9.3 [INFO] [stderr] Downloaded objc2-user-notifications v0.3.1 [INFO] [stderr] Downloaded objc2-ui-kit v0.3.1 [INFO] [stderr] Downloaded tokio v1.46.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] b3b0c7403a5689a962756a0cd8c17182061f899750e91719f9b9e3ac51cf679a [INFO] running `Command { std: "docker" "start" "-a" "b3b0c7403a5689a962756a0cd8c17182061f899750e91719f9b9e3ac51cf679a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b3b0c7403a5689a962756a0cd8c17182061f899750e91719f9b9e3ac51cf679a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b3b0c7403a5689a962756a0cd8c17182061f899750e91719f9b9e3ac51cf679a", kill_on_drop: false }` [INFO] [stdout] b3b0c7403a5689a962756a0cd8c17182061f899750e91719f9b9e3ac51cf679a [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] d099554176c3806b8fb2bef759a4b092a43e96a6709eca917c6ed486f201c29c [INFO] running `Command { std: "docker" "start" "-a" "d099554176c3806b8fb2bef759a4b092a43e96a6709eca917c6ed486f201c29c", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2024 which implies `resolver = "3"` [INFO] [stderr] | [INFO] [stderr] = note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] = note: to use the edition 2024 resolver, specify `workspace.resolver = "3"` in the workspace root's manifest [INFO] [stderr] = note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Compiling log v0.4.27 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking signal-hook-registry v1.4.5 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Compiling foldhash v0.1.5 [INFO] [stderr] Checking libloading v0.8.8 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Compiling hashbrown v0.15.4 [INFO] [stderr] Compiling rustix v1.0.7 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking getrandom v0.3.3 [INFO] [stderr] Checking linux-raw-sys v0.4.15 [INFO] [stderr] Checking dlib v0.5.2 [INFO] [stderr] Compiling wayland-sys v0.31.6 [INFO] [stderr] Compiling cfg-if v1.0.1 [INFO] [stderr] Compiling bytemuck_derive v1.9.3 [INFO] [stderr] Compiling indexmap v2.10.0 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling jobserver v0.1.33 [INFO] [stderr] Compiling cc v1.2.27 [INFO] [stderr] Compiling wayland-client v0.31.10 [INFO] [stderr] Compiling wayland-scanner v0.31.6 [INFO] [stderr] Checking bytemuck v1.23.1 [INFO] [stderr] Compiling serde_json v1.0.140 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking flate2 v1.1.2 [INFO] [stderr] Checking parking_lot_core v0.9.11 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Checking tokio v1.46.0 [INFO] [stderr] Compiling serde_spanned v0.6.9 [INFO] [stderr] Compiling toml_datetime v0.6.11 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Compiling thiserror v2.0.12 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Compiling toml_edit v0.22.27 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling wayland-backend v0.3.10 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Compiling wasm-bindgen-shared v0.2.100 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Compiling zstd-sys v2.0.15+zstd.1.5.7 [INFO] [stderr] Compiling equator-macro v0.4.2 [INFO] [stderr] Compiling profiling-procmacros v1.0.17 [INFO] [stderr] Compiling bumpalo v3.19.0 [INFO] [stderr] Compiling openssl-sys v0.9.109 [INFO] [stderr] Compiling wasm-bindgen-backend v0.2.100 [INFO] [stderr] Checking profiling v1.0.17 [INFO] [stderr] Checking equator v0.4.2 [INFO] [stderr] Checking polling v3.8.0 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Compiling zerofrom v0.1.6 [INFO] [stderr] Checking memmap2 v0.9.5 [INFO] [stderr] Checking local-waker v0.1.4 [INFO] [stderr] Compiling proc-macro-crate v3.3.0 [INFO] [stderr] Compiling time-core v0.1.4 [INFO] [stderr] Compiling num-conv v0.1.0 [INFO] [stderr] Checking deranged v0.4.0 [INFO] [stderr] Compiling time-macros v0.2.22 [INFO] [stderr] Compiling yoke v0.8.0 [INFO] [stderr] Compiling wasm-bindgen-macro-support v0.2.100 [INFO] [stderr] Compiling zvariant_derive v4.2.0 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking aligned-vec v0.6.4 [INFO] [stderr] Checking tokio-util v0.7.15 [INFO] [stderr] Checking http v0.2.12 [INFO] [stderr] Compiling actix-macros v0.2.4 [INFO] [stderr] Compiling wasm-bindgen v0.2.100 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Checking x11rb-protocol v0.13.1 [INFO] [stderr] Checking actix-rt v2.10.0 [INFO] [stderr] Checking time v0.3.41 [INFO] [stderr] Compiling wasm-bindgen-macro v0.2.100 [INFO] [stderr] Checking wayland-protocols v0.32.8 [INFO] [stderr] Compiling rav1e v0.7.1 [INFO] [stderr] Checking v_frame v0.3.9 [INFO] [stderr] Checking actix-utils v3.0.1 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking actix-service v2.0.3 [INFO] [stderr] Compiling derive_more-impl v2.0.1 [INFO] [stderr] Checking av1-grain v0.2.4 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking ahash v0.8.12 [INFO] [stderr] Checking brotli-decompressor v5.0.0 [INFO] [stderr] Compiling zerovec v0.11.2 [INFO] [stderr] Compiling ring v0.16.20 [INFO] [stderr] Checking itertools v0.12.1 [INFO] [stderr] Checking bytestring v1.4.0 [INFO] [stderr] Compiling cookie v0.16.2 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Checking maybe-rayon v0.1.1 [INFO] [stderr] Compiling arg_enum_proc_macro v0.3.4 [INFO] [stderr] Compiling num-derive v0.4.2 [INFO] [stderr] Compiling simd_helpers v0.1.0 [INFO] [stderr] Compiling openssl v0.10.73 [INFO] [stderr] Checking brotli v8.0.1 [INFO] [stderr] Checking rand v0.9.1 [INFO] [stderr] Checking derive_more v2.0.1 [INFO] [stderr] Checking h2 v0.3.26 [INFO] [stderr] Checking actix-codec v0.5.2 [INFO] [stderr] Checking wayland-protocols-wlr v0.3.8 [INFO] [stderr] Checking local-channel v0.1.5 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking enumflags2 v0.7.12 [INFO] [stderr] Checking avif-serialize v0.8.4 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Checking impl-more v0.1.9 [INFO] [stderr] Checking rgb v0.8.50 [INFO] [stderr] Checking language-tags v0.3.2 [INFO] [stderr] Checking zvariant v4.2.0 [INFO] [stderr] Checking exr v1.73.0 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Checking tiff v0.9.1 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking image-webp v0.2.3 [INFO] [stderr] Checking ravif v0.11.20 [INFO] [stderr] Checking zune-jpeg v0.4.19 [INFO] [stderr] Checking webpki v0.22.4 [INFO] [stderr] Checking qoi v0.4.1 [INFO] [stderr] Compiling rustls v0.20.9 [INFO] [stderr] Checking zbus_names v3.0.0 [INFO] [stderr] Compiling tinystr v0.8.1 [INFO] [stderr] Checking image v0.25.6 [INFO] [stderr] Checking sct v0.7.1 [INFO] [stderr] Checking h2 v0.4.11 [INFO] [stderr] Compiling quick-xml v0.30.0 [INFO] [stderr] Compiling mime_guess v2.0.5 [INFO] [stderr] Compiling icu_locale_core v2.0.0 [INFO] [stderr] Checking cipher v0.4.4 [INFO] [stderr] Checking x11rb v0.13.1 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Compiling zbus_xml v4.0.0 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Compiling potential_utf v0.1.2 [INFO] [stderr] Compiling zerotrie v0.2.2 [INFO] [stderr] Checking actix-http v3.11.0 [INFO] [stderr] Checking universal-hash v0.5.1 [INFO] [stderr] Checking ttf-parser v0.25.1 [INFO] [stderr] Compiling icu_provider v2.0.0 [INFO] [stderr] Compiling zbus-lockstep v0.4.4 [INFO] [stderr] Checking polyval v0.6.2 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Compiling icu_collections v2.0.0 [INFO] [stderr] Checking tokio-rustls v0.23.4 [INFO] [stderr] Checking async-fs v2.1.2 [INFO] [stderr] Checking async-io v2.4.1 [INFO] [stderr] Checking webpki-roots v0.22.6 [INFO] [stderr] Compiling zbus_macros v4.4.0 [INFO] [stderr] Checking tempfile v3.20.0 [INFO] [stderr] Checking nom v8.0.0 [INFO] [stderr] Compiling rustls v0.23.28 [INFO] [stderr] Checking ab_glyph_rasterizer v0.1.9 [INFO] [stderr] Checking anstream v0.6.19 [INFO] [stderr] Compiling gl_generator v0.14.0 [INFO] [stderr] Checking tower-http v0.6.6 [INFO] [stderr] Checking owned_ttf_parser v0.25.0 [INFO] [stderr] Checking ab_glyph v0.2.30 [INFO] [stderr] Checking actix-tls v3.4.0 [INFO] [stderr] Checking ghash v0.5.1 [INFO] [stderr] Compiling zbus-lockstep-macros v0.4.4 [INFO] [stderr] Checking ctr v0.9.2 [INFO] [stderr] Checking aes v0.8.4 [INFO] [stderr] Checking hyper v1.6.0 [INFO] [stderr] Checking wayland-protocols-misc v0.3.8 [INFO] [stderr] Checking env_filter v0.1.3 [INFO] [stderr] Checking calloop v0.13.0 [INFO] [stderr] Checking xkbcommon v0.9.0 [INFO] [stderr] Checking aead v0.5.2 [INFO] [stderr] Checking os_pipe v1.2.2 [INFO] [stderr] Compiling zeroize v1.8.1 [INFO] [stderr] Checking wayland-csd-frame v0.3.0 [INFO] [stderr] Checking aes-gcm v0.10.3 [INFO] [stderr] Checking wayland-clipboard-listener v0.3.1 [INFO] [stderr] Compiling rustls-pki-types v1.12.0 [INFO] [stderr] Checking env_logger v0.11.8 [INFO] [stderr] Checking wayland-cursor v0.31.10 [INFO] [stderr] Checking calloop-wayland-source v0.3.0 [INFO] [stderr] Compiling icu_properties v2.0.1 [INFO] [stderr] Checking awc v3.7.0 [INFO] [stderr] Checking clipboard-rs v0.3.0 [INFO] [stderr] Checking fs4 v0.13.1 [INFO] [stderr] Checking hyper-util v0.1.14 [INFO] [stderr] Compiling crossbeam-utils v0.8.21 [INFO] [stderr] Compiling aho-corasick v1.1.3 [INFO] [stderr] Compiling untrusted v0.9.0 [INFO] [stderr] Compiling regex-syntax v0.8.5 [INFO] [stderr] Checking tiny-skia-path v0.11.4 [INFO] [stderr] Checking smithay-client-toolkit v0.19.2 [INFO] [stderr] Checking enigo v0.6.1 [INFO] [stderr] Checking x11-dl v2.21.0 [INFO] [stderr] Checking zbus v4.4.0 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stderr] Checking reqwest v0.12.22 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling regex-automata v0.4.9 [INFO] [stderr] Compiling percent-encoding v2.3.1 [INFO] [stderr] Compiling futures-sink v0.3.31 [INFO] [stderr] Compiling tinyvec v1.9.0 [INFO] [stderr] Compiling form_urlencoded v1.2.1 [INFO] [stderr] Checking clippy v0.1.5 (/opt/rustwide/workdir/clippy) [INFO] [stderr] Compiling rustls-webpki v0.103.3 [INFO] [stderr] Checking tiny-skia v0.11.4 [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> clippy/src/user.rs:141:83 [INFO] [stdout] | [INFO] [stdout] 141 | user_data.add_pending(old_id, Edit::Edit { path: path.into(), typ: typ, new_id, }).await; [INFO] [stdout] | ^^^^^^^^ help: replace it with: `typ` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling concurrent-queue v2.5.0 [INFO] [stdout] warning: unused variable: `typ` [INFO] [stdout] --> clippy/src/user.rs:166:39 [INFO] [stdout] | [INFO] [stdout] 166 | Edit::New { path, typ } => match File::open(&path).await { [INFO] [stdout] | ^^^ help: try ignoring the field: `typ: _` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `typ` [INFO] [stdout] --> clippy/src/user.rs:198:40 [INFO] [stdout] | [INFO] [stdout] 198 | Edit::Edit { path, typ, new_id } => match File::open(&path).await { [INFO] [stdout] | ^^^ help: try ignoring the field: `typ: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling winit v0.30.11 [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> clippy/src/encryption_decryption.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | Ok(cipher.decrypt(nonce, ciphertext)?) [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] 26 - Ok(cipher.decrypt(nonce, ciphertext)?) [INFO] [stdout] 26 + cipher.decrypt(nonce, ciphertext) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> clippy/src/http.rs:46:15 [INFO] [stdout] | [INFO] [stdout] 46 | .post(&format!("{}/update", SERVER)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}/update", SERVER)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking emath v0.31.1 [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> clippy/src/ipc.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | / pub mod ipc { [INFO] [stdout] 3 | | use crate::write_clipboard::copy_to_unix; [INFO] [stdout] 4 | | use crate::{ [INFO] [stdout] 5 | | API_KEY, GUI_BIN, MessageChannel, MessageIPC, get_image_path, get_path_local, log_error, [INFO] [stdout] ... | [INFO] [stdout] 150 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> clippy/src/ipc.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | Ok(process.kill()?) [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] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 111 - Ok(process.kill()?) [INFO] [stdout] 111 + process.kill() [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] --> clippy/src/ipc.rs:121:17 [INFO] [stdout] | [INFO] [stdout] 121 | / match serde_json::from_str(&buf)? { [INFO] [stdout] 122 | | MessageIPC::OpentGUI => { [INFO] [stdout] 123 | | let rx = rx.clone(); [INFO] [stdout] 124 | | if let Ok(mut guard) = is_it_new.lock() { [INFO] [stdout] ... | [INFO] [stdout] 142 | | _ => {} [INFO] [stdout] 143 | | } [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] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 121 ~ if let MessageIPC::OpentGUI = serde_json::from_str(&buf)? { [INFO] [stdout] 122 + let rx = rx.clone(); [INFO] [stdout] 123 + if let Ok(mut guard) = is_it_new.lock() { [INFO] [stdout] 124 + if guard.is_none() { [INFO] [stdout] 125 + let is_it_new_clone = Arc::clone(&is_it_new); [INFO] [stdout] 126 + let rx_clone = rx.clone(); [INFO] [stdout] 127 + [INFO] [stdout] 128 + let handle = thread::spawn(move || { [INFO] [stdout] 129 + if let Err(e) = start_gui(&rx_clone) { [INFO] [stdout] 130 + error!("Error opening clippy-gui: {}", e); [INFO] [stdout] 131 + } [INFO] [stdout] 132 + [INFO] [stdout] 133 + if let Ok(mut inner) = is_it_new_clone.lock() { [INFO] [stdout] 134 + *inner = None; [INFO] [stdout] 135 + } [INFO] [stdout] 136 + }); [INFO] [stdout] 137 + *guard = Some(handle); [INFO] [stdout] 138 + } [INFO] [stdout] 139 + } [INFO] [stdout] 140 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/ipc.rs:124:25 [INFO] [stdout] | [INFO] [stdout] 124 | / if let Ok(mut guard) = is_it_new.lock() { [INFO] [stdout] 125 | | if guard.is_none() { [INFO] [stdout] 126 | | let is_it_new_clone = Arc::clone(&is_it_new); [INFO] [stdout] 127 | | let rx_clone = rx.clone(); [INFO] [stdout] ... | [INFO] [stdout] 140 | | } [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] 124 ~ if let Ok(mut guard) = is_it_new.lock() [INFO] [stdout] 125 ~ && guard.is_none() { [INFO] [stdout] 126 | let is_it_new_clone = Arc::clone(&is_it_new); [INFO] [stdout] ... [INFO] [stdout] 138 | *guard = Some(handle); [INFO] [stdout] 139 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy/src/read_clipboard.rs:73:21 [INFO] [stdout] | [INFO] [stdout] 73 | &self.tx, [INFO] [stdout] | ^^^^^^^^ help: change this to: `self.tx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy/src/read_clipboard.rs:80:21 [INFO] [stdout] | [INFO] [stdout] 80 | &self.tx, [INFO] [stdout] | ^^^^^^^^ help: change this to: `self.tx` [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 loop could be written as a `while let` loop [INFO] [stdout] --> clippy/src/user.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | / loop { [INFO] [stdout] 38 | | let Some(usercred) = usersettings.get_sync() else { [INFO] [stdout] 39 | | break; [INFO] [stdout] 40 | | }; [INFO] [stdout] ... | [INFO] [stdout] 81 | | health(&client, rx, &user_data).await; [INFO] [stdout] 82 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(usercred) = usersettings.get_sync() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy/src/user.rs:46:44 [INFO] [stdout] | [INFO] [stdout] 46 | if let Err(e) = get_token_serv(&usercred, &client).await { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `usercred` [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 can be `std::io::Error::other(_)` [INFO] [stdout] --> clippy/src/user.rs:252:32 [INFO] [stdout] | [INFO] [stdout] 252 | return Err(io::Error::new( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 253 | | io::ErrorKind::Other, [INFO] [stdout] 254 | | "Error removing pending data", [INFO] [stdout] 255 | | )); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 252 ~ return Err(io::Error::other( [INFO] [stdout] 253 ~ "Error removing pending data", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy/src/user.rs:307:61 [INFO] [stdout] | [INFO] [stdout] 307 | log_error!(user_data.remove_and_remove_file(&id)); [INFO] [stdout] | ^^^ help: change this to: `id` [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 `if` can be collapsed into the outer `match` [INFO] [stdout] --> clippy/src/user.rs:351:13 [INFO] [stdout] | [INFO] [stdout] 351 | / if ws.send(ws::Message::Pong(p)).await.is_err() { [INFO] [stdout] 352 | | return Err("Unable to send pong to server".into()); [INFO] [stdout] 353 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 350 ~ ws::Frame::Ping(p) [INFO] [stdout] 351 ~ if ws.send(ws::Message::Pong(p)).await.is_err() => { [INFO] [stdout] 352 | return Err("Unable to send pong to server".into()); [INFO] [stdout] 353 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy/src/lib.rs:85:24 [INFO] [stdout] | [INFO] [stdout] 85 | save_image(&id, &general_purpose::STANDARD.decode(&self.data).unwrap())?; [INFO] [stdout] | ^^^ help: change this to: `id` [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 can be `std::io::Error::other(_)` [INFO] [stdout] --> clippy/src/lib.rs:90:30 [INFO] [stdout] | [INFO] [stdout] 90 | .map_err(|e| io::Error::new(io::ErrorKind::Other, e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 90 - .map_err(|e| io::Error::new(io::ErrorKind::Other, e))?; [INFO] [stdout] 90 + .map_err(|e| io::Error::other(e))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> clippy/src/lib.rs:138:34 [INFO] [stdout] | [INFO] [stdout] 138 | let old_path = path.join(&format!("{}.png", old_id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}.png", old_id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> clippy/src/lib.rs:140:38 [INFO] [stdout] | [INFO] [stdout] 140 | let new_path = path.join(&format!("{}.png", new_id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}.png", new_id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> clippy/src/lib.rs:275:13 [INFO] [stdout] | [INFO] [stdout] 275 | / for dir in entries { [INFO] [stdout] 276 | | if let Ok(entry) = dir { [INFO] [stdout] 277 | | if let Ok(metadata) = File::open(entry.path()) { [INFO] [stdout] 278 | | if let Ok(data) = serde_json::from_reader::(metadata) { [INFO] [stdout] ... | [INFO] [stdout] 294 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> clippy/src/lib.rs:276:17 [INFO] [stdout] | [INFO] [stdout] 276 | / if let Ok(entry) = dir { [INFO] [stdout] 277 | | if let Ok(metadata) = File::open(entry.path()) { [INFO] [stdout] 278 | | if let Ok(data) = serde_json::from_reader::(metadata) { [INFO] [stdout] 279 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] ... | [INFO] [stdout] 293 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 275 ~ for entry in entries.flatten() { [INFO] [stdout] 276 + if let Ok(metadata) = File::open(entry.path()) { [INFO] [stdout] 277 + if let Ok(data) = serde_json::from_reader::(metadata) { [INFO] [stdout] 278 + if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 279 + pending.insert( [INFO] [stdout] 280 + name.to_string(), [INFO] [stdout] 281 + ( [INFO] [stdout] 282 + Edit::New { [INFO] [stdout] 283 + path: entry.path(), [INFO] [stdout] 284 + typ: data.typ, [INFO] [stdout] 285 + }, [INFO] [stdout] 286 + DataState::WaitingToSend, [INFO] [stdout] 287 + ), [INFO] [stdout] 288 + ); [INFO] [stdout] 289 + } [INFO] [stdout] 290 + } [INFO] [stdout] 291 + } [INFO] [stdout] 292 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/lib.rs:276:17 [INFO] [stdout] | [INFO] [stdout] 276 | / if let Ok(entry) = dir { [INFO] [stdout] 277 | | if let Ok(metadata) = File::open(entry.path()) { [INFO] [stdout] 278 | | if let Ok(data) = serde_json::from_reader::(metadata) { [INFO] [stdout] 279 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] ... | [INFO] [stdout] 293 | | } [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] 276 ~ if let Ok(entry) = dir [INFO] [stdout] 277 ~ && let Ok(metadata) = File::open(entry.path()) { [INFO] [stdout] 278 | if let Ok(data) = serde_json::from_reader::(metadata) { [INFO] [stdout] ... [INFO] [stdout] 291 | } [INFO] [stdout] 292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/lib.rs:277:21 [INFO] [stdout] | [INFO] [stdout] 277 | / if let Ok(metadata) = File::open(entry.path()) { [INFO] [stdout] 278 | | if let Ok(data) = serde_json::from_reader::(metadata) { [INFO] [stdout] 279 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 280 | | pending.insert( [INFO] [stdout] ... | [INFO] [stdout] 292 | | } [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] 277 ~ if let Ok(metadata) = File::open(entry.path()) [INFO] [stdout] 278 ~ && let Ok(data) = serde_json::from_reader::(metadata) { [INFO] [stdout] 279 | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] ... [INFO] [stdout] 290 | } [INFO] [stdout] 291 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/lib.rs:278:25 [INFO] [stdout] | [INFO] [stdout] 278 | / if let Ok(data) = serde_json::from_reader::(metadata) { [INFO] [stdout] 279 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 280 | | pending.insert( [INFO] [stdout] 281 | | name.to_string(), [INFO] [stdout] ... | [INFO] [stdout] 291 | | } [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] 278 ~ if let Ok(data) = serde_json::from_reader::(metadata) [INFO] [stdout] 279 ~ && let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 280 | pending.insert( [INFO] [stdout] ... [INFO] [stdout] 289 | ); [INFO] [stdout] 290 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> clippy/src/lib.rs:301:13 [INFO] [stdout] | [INFO] [stdout] 301 | / for dir in entries { [INFO] [stdout] 302 | | if let Ok(entry) = dir { [INFO] [stdout] 303 | | if let Ok(metadata) = entry.metadata() { [INFO] [stdout] 304 | | if metadata.is_file() { [INFO] [stdout] ... | [INFO] [stdout] 311 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> clippy/src/lib.rs:302:17 [INFO] [stdout] | [INFO] [stdout] 302 | / if let Ok(entry) = dir { [INFO] [stdout] 303 | | if let Ok(metadata) = entry.metadata() { [INFO] [stdout] 304 | | if metadata.is_file() { [INFO] [stdout] 305 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] ... | [INFO] [stdout] 310 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 301 ~ for entry in entries.flatten() { [INFO] [stdout] 302 + if let Ok(metadata) = entry.metadata() { [INFO] [stdout] 303 + if metadata.is_file() { [INFO] [stdout] 304 + if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 305 + data.insert(name.to_string()); [INFO] [stdout] 306 + } [INFO] [stdout] 307 + } [INFO] [stdout] 308 + } [INFO] [stdout] 309 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/lib.rs:302:17 [INFO] [stdout] | [INFO] [stdout] 302 | / if let Ok(entry) = dir { [INFO] [stdout] 303 | | if let Ok(metadata) = entry.metadata() { [INFO] [stdout] 304 | | if metadata.is_file() { [INFO] [stdout] 305 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] ... | [INFO] [stdout] 310 | | } [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] 302 ~ if let Ok(entry) = dir [INFO] [stdout] 303 ~ && let Ok(metadata) = entry.metadata() { [INFO] [stdout] 304 | if metadata.is_file() { [INFO] [stdout] ... [INFO] [stdout] 308 | } [INFO] [stdout] 309 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/lib.rs:303:21 [INFO] [stdout] | [INFO] [stdout] 303 | / if let Ok(metadata) = entry.metadata() { [INFO] [stdout] 304 | | if metadata.is_file() { [INFO] [stdout] 305 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 306 | | data.insert(name.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 309 | | } [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] 303 ~ if let Ok(metadata) = entry.metadata() [INFO] [stdout] 304 ~ && metadata.is_file() { [INFO] [stdout] 305 | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 306 | data.insert(name.to_string()); [INFO] [stdout] 307 | } [INFO] [stdout] 308 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/lib.rs:304:25 [INFO] [stdout] | [INFO] [stdout] 304 | / if metadata.is_file() { [INFO] [stdout] 305 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 306 | | data.insert(name.to_string()); [INFO] [stdout] 307 | | } [INFO] [stdout] 308 | | } [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] 304 ~ if metadata.is_file() [INFO] [stdout] 305 ~ && let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 306 | data.insert(name.to_string()); [INFO] [stdout] 307 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> clippy/src/lib.rs:329:17 [INFO] [stdout] | [INFO] [stdout] 329 | let val = self.pending.lock().unwrap(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> clippy/src/lib.rs:346:36 [INFO] [stdout] | [INFO] [stdout] 346 | self.notify.notified().await; [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] = note: `#[warn(clippy::await_holding_lock)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> clippy/src/lib.rs:434:17 [INFO] [stdout] | [INFO] [stdout] 434 | return Err(e.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] 434 - return Err(e.into()); [INFO] [stdout] 434 + Err(e.into()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::io::Error` [INFO] [stdout] --> clippy/src/lib.rs:434:28 [INFO] [stdout] | [INFO] [stdout] 434 | return Err(e.into()); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UserSettings` [INFO] [stdout] --> clippy/src/lib.rs:491:5 [INFO] [stdout] | [INFO] [stdout] 491 | / pub fn new() -> Self { [INFO] [stdout] 492 | | Self { [INFO] [stdout] 493 | | sync: None, [INFO] [stdout] 494 | | disable_sync: false, [INFO] [stdout] ... | [INFO] [stdout] 504 | | } [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] 490 + impl Default for UserSettings { [INFO] [stdout] 491 + fn default() -> Self { [INFO] [stdout] 492 + Self::new() [INFO] [stdout] 493 + } [INFO] [stdout] 494 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> clippy/src/lib.rs:519:10 [INFO] [stdout] | [INFO] [stdout] 519 | !(self.sync == None) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.sync.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> clippy/src/lib.rs:548:20 [INFO] [stdout] | [INFO] [stdout] 548 | let file = if let Ok(data) = fs::read(&user_config) { [INFO] [stdout] | ____________________^ [INFO] [stdout] 549 | | Some(data) [INFO] [stdout] 550 | | } else { [INFO] [stdout] 551 | | None [INFO] [stdout] 552 | | }; [INFO] [stdout] | |_________^ help: replace with: `fs::read(&user_config).ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/lib.rs:590:13 [INFO] [stdout] | [INFO] [stdout] 590 | / if user_config.is_file() { [INFO] [stdout] 591 | | if let Err(e) = fs::remove_file(&user_config) { [INFO] [stdout] 592 | | error!("Unable to store settings"); [INFO] [stdout] 593 | | debug!("{}", e); [INFO] [stdout] 594 | | }; [INFO] [stdout] 595 | | } [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] 590 ~ if user_config.is_file() [INFO] [stdout] 591 ~ && let Err(e) = fs::remove_file(&user_config) { [INFO] [stdout] 592 | error!("Unable to store settings"); [INFO] [stdout] 593 | debug!("{}", e); [INFO] [stdout] 594 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling regex-lite v0.1.6 [INFO] [stderr] Compiling openssl-probe v0.1.6 [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> clippy/src/lib.rs:765:9 [INFO] [stdout] | [INFO] [stdout] 765 | return path; [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] 765 - return path; [INFO] [stdout] 765 + path [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> clippy/src/lib.rs:796:9 [INFO] [stdout] | [INFO] [stdout] 796 | return path; [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] 796 - return path; [INFO] [stdout] 796 + path [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> clippy/src/lib.rs:829:9 [INFO] [stdout] | [INFO] [stdout] 829 | return path; [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] 829 - return path; [INFO] [stdout] 829 + path [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> clippy/src/lib.rs:970:27 [INFO] [stdout] | [INFO] [stdout] 970 | pub fn get_image_path(id: &PathBuf) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 970 - pub fn get_image_path(id: &PathBuf) -> Option { [INFO] [stdout] 970 + pub fn get_image_path(id: &Path) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling slab v0.4.10 [INFO] [stdout] warning: this if-then-else expression will always return true [INFO] [stdout] --> clippy/src/lib.rs:1084:5 [INFO] [stdout] | [INFO] [stdout] 1084 | / if otp.len() == 6 && otp.chars().all(|x| x.is_ascii_digit()) { [INFO] [stdout] 1085 | | true [INFO] [stdout] 1086 | | } else { [INFO] [stdout] 1087 | | true [INFO] [stdout] 1088 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> clippy/src/lib.rs:1084:66 [INFO] [stdout] | [INFO] [stdout] 1084 | if otp.len() == 6 && otp.chars().all(|x| x.is_ascii_digit()) { [INFO] [stdout] | __________________________________________________________________^ [INFO] [stdout] 1085 | | true [INFO] [stdout] 1086 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> clippy/src/lib.rs:1086:12 [INFO] [stdout] | [INFO] [stdout] 1086 | } else { [INFO] [stdout] | ____________^ [INFO] [stdout] 1087 | | true [INFO] [stdout] 1088 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> clippy/src/lib.rs:1092:57 [INFO] [stdout] | [INFO] [stdout] 1092 | if let Err(err) = fs::rename(&path, get_path().join(&time)) { [INFO] [stdout] | ^^^^^ help: change this to: `time` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/lib.rs:1096:5 [INFO] [stdout] | [INFO] [stdout] 1096 | / if thumbnail && typ.starts_with("image/") { [INFO] [stdout] 1097 | | if let Some(file_name) = path.file_name().and_then(|n| n.to_str()) { [INFO] [stdout] 1098 | | let image_path = get_path_image(); [INFO] [stdout] 1099 | | let old_img_file_name = format!("{}.png", file_name); [INFO] [stdout] ... | [INFO] [stdout] 1107 | | } [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] 1096 ~ if thumbnail && typ.starts_with("image/") [INFO] [stdout] 1097 ~ && let Some(file_name) = path.file_name().and_then(|n| n.to_str()) { [INFO] [stdout] 1098 | let image_path = get_path_image(); [INFO] [stdout] ... [INFO] [stdout] 1105 | } [INFO] [stdout] 1106 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy/src/lib.rs:1118:41 [INFO] [stdout] | [INFO] [stdout] 1118 | let image = image::load_from_memory(&data).map_err(|e| { [INFO] [stdout] | ^^^^^ help: change this to: `data` [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 can be `std::io::Error::other(_)` [INFO] [stdout] --> clippy/src/lib.rs:1129:22 [INFO] [stdout] | [INFO] [stdout] 1129 | .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Image write error: {e}")))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 1129 - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Image write error: {e}")))?; [INFO] [stdout] 1129 + .map_err(|e| io::Error::other(format!("Image write error: {e}")))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling rustls-native-certs v0.8.1 [INFO] [stderr] Compiling regex v1.11.1 [INFO] [stderr] Compiling futures-util v0.3.31 [INFO] [stderr] Compiling sha2 v0.10.9 [INFO] [stderr] Compiling actix-router v0.5.3 [INFO] [stderr] Checking ecolor v0.31.1 [INFO] [stderr] Compiling chrono v0.4.41 [INFO] [stderr] Compiling event-listener v5.4.0 [INFO] [stderr] Checking accesskit_consumer v0.26.0 [INFO] [stderr] Checking sctk-adwaita v0.10.1 [INFO] [stderr] Checking atspi-common v0.6.0 [INFO] [stderr] Compiling unicode-normalization v0.1.24 [INFO] [stderr] Compiling crossbeam-queue v0.3.12 [INFO] [stderr] Compiling futures-intrusive v0.5.0 [INFO] [stderr] Compiling hmac v0.12.1 [INFO] [stderr] Compiling glutin_egl_sys v0.7.1 [INFO] [stderr] Compiling glutin_glx_sys v0.6.1 [INFO] [stderr] Checking wayland-protocols-plasma v0.3.8 [INFO] [stderr] Checking xkbcommon-dl v0.4.2 [INFO] [stderr] Compiling psm v0.1.26 [INFO] [stderr] Compiling hashlink v0.10.0 [INFO] [stderr] Compiling base64 v0.22.1 [INFO] [stderr] Compiling tokio-stream v0.1.17 [INFO] [stderr] Compiling darling_core v0.20.11 [INFO] [stderr] Checking epaint v0.31.1 [INFO] [stderr] Compiling stringprep v0.1.5 [INFO] [stderr] Compiling hkdf v0.12.4 [INFO] [stderr] Compiling actix-web-codegen v4.3.0 [INFO] [stderr] Checking atspi-proxies v0.6.0 [INFO] [stderr] Checking accesskit_atspi_common v0.10.1 [INFO] [stderr] Compiling sqlx-core v0.8.6 [INFO] [stderr] Compiling atoi v2.0.0 [INFO] [stderr] Compiling futures-channel v0.3.31 [INFO] [stderr] Compiling md-5 v0.10.6 [INFO] [stderr] Checking actix-server v2.6.0 [INFO] [stderr] Compiling stacker v0.1.21 [INFO] [stderr] Compiling bitflags v2.9.1 [INFO] [stderr] Compiling whoami v1.6.0 [INFO] [stderr] Checking actix-web v4.11.0 [INFO] [stderr] Compiling darling_macro v0.20.11 [INFO] [stderr] Checking egui v0.31.1 [INFO] [stderr] Compiling toml v0.5.11 [INFO] [stderr] Checking atspi-connection v0.6.0 [INFO] [stderr] Checking atspi v0.22.0 [INFO] [stderr] Checking accesskit_unix v0.13.1 [INFO] [stderr] Compiling sqlx-postgres v0.8.6 [INFO] [stderr] Compiling winres v0.1.12 [INFO] [stderr] Checking glutin v0.32.3 [INFO] [stderr] Compiling darling v0.20.11 [INFO] [stderr] Checking smithay-clipboard v0.7.2 [INFO] [stderr] Checking arboard v3.6.0 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking webbrowser v1.0.5 [INFO] [stderr] Compiling litrs v0.4.1 [INFO] [stderr] Checking byteorder v1.5.0 [INFO] [stderr] Checking accesskit_winit v0.23.1 [INFO] [stderr] Compiling parse-size v1.1.0 [INFO] [stderr] Compiling derive_more v0.99.20 [INFO] [stderr] Compiling actix-multipart-derive v0.7.0 [INFO] [stderr] Checking glutin-winit v0.5.0 [INFO] [stderr] Checking chumsky v0.9.3 [INFO] [stderr] Compiling document-features v0.2.11 [INFO] [stderr] Compiling clippy-gui v0.1.5 (/opt/rustwide/workdir/clippy-gui) [INFO] [stderr] Checking simple_asn1 v0.6.3 [INFO] [stderr] Checking egui_glow v0.31.1 [INFO] [stderr] Checking egui-winit v0.31.1 [INFO] [stderr] Checking pem v3.0.5 [INFO] [stderr] Checking email-encoding v0.4.1 [INFO] [stderr] Checking serde_plain v1.0.2 [INFO] [stderr] Checking email_address v0.2.9 [INFO] [stderr] Checking quoted_printable v0.5.1 [INFO] [stderr] Checking jsonwebtoken v9.3.1 [INFO] [stderr] Checking actix-web-httpauth v0.8.2 [INFO] [stderr] Checking actix-ws v0.3.0 [INFO] [stderr] Checking eframe v0.31.1 [INFO] [stderr] Checking uuid v1.17.0 [INFO] [stderr] Checking lettre v0.11.17 [INFO] [stdout] warning: the variable `count` is used as a loop counter [INFO] [stdout] --> clippy-gui/src/lib.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | for line in lines { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using: `for (count, line) in lines.into_iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the variable `count` is used as a loop counter [INFO] [stdout] --> clippy-gui/src/lib.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | for line in lines { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider using: `for (count, line) in lines.into_iter().enumerate()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stdout] = note: `#[warn(clippy::explicit_counter_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> clippy/src/user.rs:141:83 [INFO] [stdout] | [INFO] [stdout] 141 | user_data.add_pending(old_id, Edit::Edit { path: path.into(), typ: typ, new_id, }).await; [INFO] [stdout] | ^^^^^^^^ help: replace it with: `typ` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> clippy-gui/src/clipboard_img_widget.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | / pub fn item_card_image( [INFO] [stdout] 12 | | data: &mut Data, [INFO] [stdout] 13 | | ui: &mut Ui, [INFO] [stdout] 14 | | texture: &egui::TextureHandle, [INFO] [stdout] ... | [INFO] [stdout] 20 | | sync: &bool, [INFO] [stdout] 21 | | ) -> Response { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> clippy-gui/src/clipboard_img_widget.rs:18:11 [INFO] [stdout] | [INFO] [stdout] 18 | path: &PathBuf, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 18 - path: &PathBuf, [INFO] [stdout] 18 + path: &Path, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> clippy-gui/src/clipboard_img_widget.rs:51:28 [INFO] [stdout] | [INFO] [stdout] 51 | if *sync && settings.get_sync().is_none() || !*sync { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 51 - if *sync && settings.get_sync().is_none() || !*sync { [INFO] [stdout] 51 + if !(*sync && !settings.get_sync().is_none()) { [INFO] [stdout] | [INFO] [stdout] 51 - if *sync && settings.get_sync().is_none() || !*sync { [INFO] [stdout] 51 + if !*sync || settings.get_sync().is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy-gui/src/clipboard_img_widget.rs:53:29 [INFO] [stdout] | [INFO] [stdout] 53 | / ... if pin_response.clicked() { [INFO] [stdout] 54 | | ... if pin_response.clicked() { [INFO] [stdout] 55 | | ... data.change_pined(); [INFO] [stdout] 56 | | ... if let Some(file_name) = [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] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 53 ~ if pin_response.clicked() [INFO] [stdout] 54 ~ && pin_response.clicked() { [INFO] [stdout] 55 | data.change_pined(); [INFO] [stdout] ... [INFO] [stdout] 66 | set_lock!(changed, true); [INFO] [stdout] 67 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy-gui/src/clipboard_img_widget.rs:71:29 [INFO] [stdout] | [INFO] [stdout] 71 | / ... if delete_response.clicked() { [INFO] [stdout] 72 | | ... if let Some(file_name) = path.file_name().and_then(|f| f.to_str()) { [INFO] [stdout] 73 | | ... let msg = clippy::MessageIPC::Delete( [INFO] [stdout] 74 | | ... path.to_path_buf(), [INFO] [stdout] ... | [INFO] [stdout] 80 | | ... } [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] 71 ~ if delete_response.clicked() [INFO] [stdout] 72 ~ && let Some(file_name) = path.file_name().and_then(|f| f.to_str()) { [INFO] [stdout] 73 | let msg = clippy::MessageIPC::Delete( [INFO] [stdout] ... [INFO] [stdout] 78 | set_lock!(changed, true); [INFO] [stdout] 79 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> clippy-gui/src/clipboard_widget.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn item_card( [INFO] [stdout] 14 | | ui: &mut Ui, [INFO] [stdout] 15 | | data: &mut Data, [INFO] [stdout] 16 | | text_label: &str, [INFO] [stdout] ... | [INFO] [stdout] 23 | | sync: &bool, [INFO] [stdout] 24 | | ) -> Response { [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] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> clippy-gui/src/clipboard_widget.rs:21:11 [INFO] [stdout] | [INFO] [stdout] 21 | path: &PathBuf, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 21 ~ path: &Path, [INFO] [stdout] 22 | ctx: &Context, [INFO] [stdout] ... [INFO] [stdout] 91 | data.get_data().unwrap().to_string(), [INFO] [stdout] 92 ~ Some(path.to_path_buf()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> clippy-gui/src/clipboard_widget.rs:59:28 [INFO] [stdout] | [INFO] [stdout] 59 | if *sync && settings.get_sync().is_none() || !*sync { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 59 - if *sync && settings.get_sync().is_none() || !*sync { [INFO] [stdout] 59 + if !(*sync && !settings.get_sync().is_none()) { [INFO] [stdout] | [INFO] [stdout] 59 - if *sync && settings.get_sync().is_none() || !*sync { [INFO] [stdout] 59 + if !*sync || settings.get_sync().is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy-gui/src/clipboard_widget.rs:75:29 [INFO] [stdout] | [INFO] [stdout] 75 | / ... if delete_response.clicked() { [INFO] [stdout] 76 | | ... if let Some(file_name) = path.file_name().and_then(|f| f.to_str()) { [INFO] [stdout] 77 | | ... let msg = clippy::MessageIPC::Delete( [INFO] [stdout] 78 | | ... path.to_path_buf(), [INFO] [stdout] ... | [INFO] [stdout] 84 | | ... } [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] 75 ~ if delete_response.clicked() [INFO] [stdout] 76 ~ && let Some(file_name) = path.file_name().and_then(|f| f.to_str()) { [INFO] [stdout] 77 | let msg = clippy::MessageIPC::Delete( [INFO] [stdout] ... [INFO] [stdout] 82 | set_lock!(changed, true); [INFO] [stdout] 83 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy-gui/src/edit_window.rs:51:33 [INFO] [stdout] | [INFO] [stdout] 51 | / ... if let Ok(val) = fs::read_to_string(path) { [INFO] [stdout] 52 | | ... if let Ok(mut data) = serde_json::from_str::(&val) { [INFO] [stdout] 53 | | ... data.change_data(&self.show_data_popup.1); [INFO] [stdout] 54 | | ... data.pined = self.show_data_popup.3; [INFO] [stdout] ... | [INFO] [stdout] 66 | | ... } [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] 51 ~ if let Ok(val) = fs::read_to_string(path) [INFO] [stdout] 52 ~ && let Ok(mut data) = serde_json::from_str::(&val) { [INFO] [stdout] 53 | data.change_data(&self.show_data_popup.1); [INFO] [stdout] ... [INFO] [stdout] 64 | } [INFO] [stdout] 65 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> clippy-gui/src/edit_window.rs:94:13 [INFO] [stdout] | [INFO] [stdout] 94 | size.y = size.y - 101.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `size.y -= 101.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> clippy-gui/src/http.rs:100:13 [INFO] [stdout] | [INFO] [stdout] 100 | Err(format!("Login failed: {}", err_msg).into()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `format!("Login failed: {}", err_msg)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> clippy-gui/src/ipc.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | / pub mod ipc { [INFO] [stdout] 3 | | use clippy::MessageIPC; [INFO] [stdout] 4 | | use std::error::Error; [INFO] [stdout] 5 | | use std::os::fd::FromRawFd; [INFO] [stdout] ... | [INFO] [stdout] 28 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `ok().expect()` on a `Result` value [INFO] [stdout] --> clippy-gui/src/ipc.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | / STREAM [INFO] [stdout] 15 | | .set(Mutex::new(stream)) [INFO] [stdout] 16 | | .ok() [INFO] [stdout] 17 | | .expect("STREAM already initialized"); [INFO] [stdout] | |_________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stdout] = note: `#[warn(clippy::ok_expect)]` on by default [INFO] [stdout] help: call `expect()` directly on the `Result` [INFO] [stdout] | [INFO] [stdout] 15 - .set(Mutex::new(stream)) [INFO] [stdout] 16 - .ok() [INFO] [stdout] 17 - .expect("STREAM already initialized"); [INFO] [stdout] 15 + .set(Mutex::new(stream)).expect("STREAM already initialized"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> clippy-gui/src/main.rs:110:27 [INFO] [stdout] | [INFO] [stdout] 110 | fn priority(path: &PathBuf) -> u8 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 110 - fn priority(path: &PathBuf) -> u8 { [INFO] [stdout] 110 + fn priority(path: &Path) -> u8 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy-gui/src/main.rs:226:29 [INFO] [stdout] | [INFO] [stdout] 226 | / ... if file.typ.starts_with("notification/") { [INFO] [stdout] 227 | | ... if let Some(val) = file.get_meta_data() { [INFO] [stdout] 228 | | ... page_data.push(( [INFO] [stdout] 229 | | ... Thumbnail::Text(val), [INFO] [stdout] ... | [INFO] [stdout] 236 | | ... } [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] 226 ~ if file.typ.starts_with("notification/") [INFO] [stdout] 227 ~ && let Some(val) = file.get_meta_data() { [INFO] [stdout] 228 | page_data.push(( [INFO] [stdout] ... [INFO] [stdout] 234 | count += 1; [INFO] [stdout] 235 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy-gui/src/main.rs:327:37 [INFO] [stdout] | [INFO] [stdout] 327 | / ... if ui.add(button_next).on_hover_text("Previous page").clicked() [INFO] [stdout] 328 | | ... { [INFO] [stdout] 329 | | ... if self.page.page_no > 1 { [INFO] [stdout] 330 | | ... self.page.page_no -= 1; [INFO] [stdout] ... | [INFO] [stdout] 334 | | ... } [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] 327 ~ if ui.add(button_next).on_hover_text("Previous page").clicked() [INFO] [stdout] 328 ~ && self.page.page_no > 1 { [INFO] [stdout] 329 | self.page.page_no -= 1; [INFO] [stdout] 330 | self.get_current_page(GETPAGE::PREVIOUS); [INFO] [stdout] 331 | self.scrool_to_top = true; [INFO] [stdout] 332 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> clippy-gui/src/clipboard_img_widget.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | / pub fn item_card_image( [INFO] [stdout] 12 | | data: &mut Data, [INFO] [stdout] 13 | | ui: &mut Ui, [INFO] [stdout] 14 | | texture: &egui::TextureHandle, [INFO] [stdout] ... | [INFO] [stdout] 20 | | sync: &bool, [INFO] [stdout] 21 | | ) -> Response { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> clippy-gui/src/clipboard_img_widget.rs:18:11 [INFO] [stdout] | [INFO] [stdout] 18 | path: &PathBuf, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 18 - path: &PathBuf, [INFO] [stdout] 18 + path: &Path, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> clippy-gui/src/clipboard_img_widget.rs:51:28 [INFO] [stdout] | [INFO] [stdout] 51 | if *sync && settings.get_sync().is_none() || !*sync { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 51 - if *sync && settings.get_sync().is_none() || !*sync { [INFO] [stdout] 51 + if !(*sync && !settings.get_sync().is_none()) { [INFO] [stdout] | [INFO] [stdout] 51 - if *sync && settings.get_sync().is_none() || !*sync { [INFO] [stdout] 51 + if !*sync || settings.get_sync().is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy-gui/src/clipboard_img_widget.rs:53:29 [INFO] [stdout] | [INFO] [stdout] 53 | / ... if pin_response.clicked() { [INFO] [stdout] 54 | | ... if pin_response.clicked() { [INFO] [stdout] 55 | | ... data.change_pined(); [INFO] [stdout] 56 | | ... if let Some(file_name) = [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] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 53 ~ if pin_response.clicked() [INFO] [stdout] 54 ~ && pin_response.clicked() { [INFO] [stdout] 55 | data.change_pined(); [INFO] [stdout] ... [INFO] [stdout] 66 | set_lock!(changed, true); [INFO] [stdout] 67 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy-gui/src/clipboard_img_widget.rs:71:29 [INFO] [stdout] | [INFO] [stdout] 71 | / ... if delete_response.clicked() { [INFO] [stdout] 72 | | ... if let Some(file_name) = path.file_name().and_then(|f| f.to_str()) { [INFO] [stdout] 73 | | ... let msg = clippy::MessageIPC::Delete( [INFO] [stdout] 74 | | ... path.to_path_buf(), [INFO] [stdout] ... | [INFO] [stdout] 80 | | ... } [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] 71 ~ if delete_response.clicked() [INFO] [stdout] 72 ~ && let Some(file_name) = path.file_name().and_then(|f| f.to_str()) { [INFO] [stdout] 73 | let msg = clippy::MessageIPC::Delete( [INFO] [stdout] ... [INFO] [stdout] 78 | set_lock!(changed, true); [INFO] [stdout] 79 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (10/7) [INFO] [stdout] --> clippy-gui/src/clipboard_widget.rs:13:1 [INFO] [stdout] | [INFO] [stdout] 13 | / pub fn item_card( [INFO] [stdout] 14 | | ui: &mut Ui, [INFO] [stdout] 15 | | data: &mut Data, [INFO] [stdout] 16 | | text_label: &str, [INFO] [stdout] ... | [INFO] [stdout] 23 | | sync: &bool, [INFO] [stdout] 24 | | ) -> Response { [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] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> clippy-gui/src/clipboard_widget.rs:21:11 [INFO] [stdout] | [INFO] [stdout] 21 | path: &PathBuf, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 21 ~ path: &Path, [INFO] [stdout] 22 | ctx: &Context, [INFO] [stdout] ... [INFO] [stdout] 91 | data.get_data().unwrap().to_string(), [INFO] [stdout] 92 ~ Some(path.to_path_buf()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> clippy-gui/src/clipboard_widget.rs:59:28 [INFO] [stdout] | [INFO] [stdout] 59 | if *sync && settings.get_sync().is_none() || !*sync { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 59 - if *sync && settings.get_sync().is_none() || !*sync { [INFO] [stdout] 59 + if !(*sync && !settings.get_sync().is_none()) { [INFO] [stdout] | [INFO] [stdout] 59 - if *sync && settings.get_sync().is_none() || !*sync { [INFO] [stdout] 59 + if !*sync || settings.get_sync().is_none() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy-gui/src/main.rs:619:53 [INFO] [stdout] | [INFO] [stdout] 619 | ... &self.newuser.email.as_ref().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.newuser.email.as_ref().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy-gui/src/clipboard_widget.rs:75:29 [INFO] [stdout] | [INFO] [stdout] 75 | / ... if delete_response.clicked() { [INFO] [stdout] 76 | | ... if let Some(file_name) = path.file_name().and_then(|f| f.to_str()) { [INFO] [stdout] 77 | | ... let msg = clippy::MessageIPC::Delete( [INFO] [stdout] 78 | | ... path.to_path_buf(), [INFO] [stdout] ... | [INFO] [stdout] 84 | | ... } [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] 75 ~ if delete_response.clicked() [INFO] [stdout] 76 ~ && let Some(file_name) = path.file_name().and_then(|f| f.to_str()) { [INFO] [stdout] 77 | let msg = clippy::MessageIPC::Delete( [INFO] [stdout] ... [INFO] [stdout] 82 | set_lock!(changed, true); [INFO] [stdout] 83 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy-gui/src/edit_window.rs:51:33 [INFO] [stdout] | [INFO] [stdout] 51 | / ... if let Ok(val) = fs::read_to_string(path) { [INFO] [stdout] 52 | | ... if let Ok(mut data) = serde_json::from_str::(&val) { [INFO] [stdout] 53 | | ... data.change_data(&self.show_data_popup.1); [INFO] [stdout] 54 | | ... data.pined = self.show_data_popup.3; [INFO] [stdout] ... | [INFO] [stdout] 66 | | ... } [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] 51 ~ if let Ok(val) = fs::read_to_string(path) [INFO] [stdout] 52 ~ && let Ok(mut data) = serde_json::from_str::(&val) { [INFO] [stdout] 53 | data.change_data(&self.show_data_popup.1); [INFO] [stdout] ... [INFO] [stdout] 64 | } [INFO] [stdout] 65 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> clippy-gui/src/edit_window.rs:94:13 [INFO] [stdout] | [INFO] [stdout] 94 | size.y = size.y - 101.0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `size.y -= 101.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> clippy-gui/src/http.rs:100:13 [INFO] [stdout] | [INFO] [stdout] 100 | Err(format!("Login failed: {}", err_msg).into()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `format!("Login failed: {}", err_msg)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> clippy-gui/src/ipc.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | / pub mod ipc { [INFO] [stdout] 3 | | use clippy::MessageIPC; [INFO] [stdout] 4 | | use std::error::Error; [INFO] [stdout] 5 | | use std::os::fd::FromRawFd; [INFO] [stdout] ... | [INFO] [stdout] 28 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `ok().expect()` on a `Result` value [INFO] [stdout] --> clippy-gui/src/ipc.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | / STREAM [INFO] [stdout] 15 | | .set(Mutex::new(stream)) [INFO] [stdout] 16 | | .ok() [INFO] [stdout] 17 | | .expect("STREAM already initialized"); [INFO] [stdout] | |_________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stdout] = note: `#[warn(clippy::ok_expect)]` on by default [INFO] [stdout] help: call `expect()` directly on the `Result` [INFO] [stdout] | [INFO] [stdout] 15 - .set(Mutex::new(stream)) [INFO] [stdout] 16 - .ok() [INFO] [stdout] 17 - .expect("STREAM already initialized"); [INFO] [stdout] 15 + .set(Mutex::new(stream)).expect("STREAM already initialized"); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> clippy-gui/src/main.rs:110:27 [INFO] [stdout] | [INFO] [stdout] 110 | fn priority(path: &PathBuf) -> u8 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 110 - fn priority(path: &PathBuf) -> u8 { [INFO] [stdout] 110 + fn priority(path: &Path) -> u8 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy-gui/src/main.rs:226:29 [INFO] [stdout] | [INFO] [stdout] 226 | / ... if file.typ.starts_with("notification/") { [INFO] [stdout] 227 | | ... if let Some(val) = file.get_meta_data() { [INFO] [stdout] 228 | | ... page_data.push(( [INFO] [stdout] 229 | | ... Thumbnail::Text(val), [INFO] [stdout] ... | [INFO] [stdout] 236 | | ... } [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] 226 ~ if file.typ.starts_with("notification/") [INFO] [stdout] 227 ~ && let Some(val) = file.get_meta_data() { [INFO] [stdout] 228 | page_data.push(( [INFO] [stdout] ... [INFO] [stdout] 234 | count += 1; [INFO] [stdout] 235 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `typ` [INFO] [stdout] --> clippy/src/user.rs:166:39 [INFO] [stdout] | [INFO] [stdout] 166 | Edit::New { path, typ } => match File::open(&path).await { [INFO] [stdout] | ^^^ help: try ignoring the field: `typ: _` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `typ` [INFO] [stdout] --> clippy/src/user.rs:198:40 [INFO] [stdout] | [INFO] [stdout] 198 | Edit::Edit { path, typ, new_id } => match File::open(&path).await { [INFO] [stdout] | ^^^ help: try ignoring the field: `typ: _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy-gui/src/main.rs:327:37 [INFO] [stdout] | [INFO] [stdout] 327 | / ... if ui.add(button_next).on_hover_text("Previous page").clicked() [INFO] [stdout] 328 | | ... { [INFO] [stdout] 329 | | ... if self.page.page_no > 1 { [INFO] [stdout] 330 | | ... self.page.page_no -= 1; [INFO] [stdout] ... | [INFO] [stdout] 334 | | ... } [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] 327 ~ if ui.add(button_next).on_hover_text("Previous page").clicked() [INFO] [stdout] 328 ~ && self.page.page_no > 1 { [INFO] [stdout] 329 | self.page.page_no -= 1; [INFO] [stdout] 330 | self.get_current_page(GETPAGE::PREVIOUS); [INFO] [stdout] 331 | self.scrool_to_top = true; [INFO] [stdout] 332 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy-gui/src/main.rs:619:53 [INFO] [stdout] | [INFO] [stdout] 619 | ... &self.newuser.email.as_ref().unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.newuser.email.as_ref().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` branch is empty [INFO] [stdout] --> clippy-gui/src/main.rs:1040:45 [INFO] [stdout] | [INFO] [stdout] 1040 | / ... if self.settings.always_on_top{ [INFO] [stdout] 1041 | | ... } [INFO] [stdout] | |_______________________^ help: you can remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_ifs [INFO] [stdout] = note: `#[warn(clippy::needless_ifs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy-gui/src/main.rs:1183:13 [INFO] [stdout] | [INFO] [stdout] 1183 | / if let Ok(mut va) = self.changed.clone().try_lock() { [INFO] [stdout] 1184 | | if *va { [INFO] [stdout] 1185 | | self.refresh(); [INFO] [stdout] 1186 | | set_lock!(self.changed, false); [INFO] [stdout] ... | [INFO] [stdout] 1190 | | } [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] 1183 ~ if let Ok(mut va) = self.changed.clone().try_lock() [INFO] [stdout] 1184 ~ && *va { [INFO] [stdout] 1185 | self.refresh(); [INFO] [stdout] ... [INFO] [stdout] 1188 | *va = false; [INFO] [stdout] 1189 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy-gui/src/main.rs:1223:41 [INFO] [stdout] | [INFO] [stdout] 1223 | ... &image_data, [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `image_data` [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 `if` branch is empty [INFO] [stdout] --> clippy-gui/src/main.rs:1040:45 [INFO] [stdout] | [INFO] [stdout] 1040 | / ... if self.settings.always_on_top{ [INFO] [stdout] 1041 | | ... } [INFO] [stdout] | |_______________________^ help: you can remove it [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_ifs [INFO] [stdout] = note: `#[warn(clippy::needless_ifs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking actix-multipart v0.7.2 [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy-gui/src/main.rs:1183:13 [INFO] [stdout] | [INFO] [stdout] 1183 | / if let Ok(mut va) = self.changed.clone().try_lock() { [INFO] [stdout] 1184 | | if *va { [INFO] [stdout] 1185 | | self.refresh(); [INFO] [stdout] 1186 | | set_lock!(self.changed, false); [INFO] [stdout] ... | [INFO] [stdout] 1190 | | } [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] 1183 ~ if let Ok(mut va) = self.changed.clone().try_lock() [INFO] [stdout] 1184 ~ && *va { [INFO] [stdout] 1185 | self.refresh(); [INFO] [stdout] ... [INFO] [stdout] 1188 | *va = false; [INFO] [stdout] 1189 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy-gui/src/main.rs:1223:41 [INFO] [stdout] | [INFO] [stdout] 1223 | ... &image_data, [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `image_data` [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] --> clippy/src/encryption_decryption.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | Ok(cipher.decrypt(nonce, ciphertext)?) [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] 26 - Ok(cipher.decrypt(nonce, ciphertext)?) [INFO] [stdout] 26 + cipher.decrypt(nonce, ciphertext) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> clippy/src/http.rs:46:15 [INFO] [stdout] | [INFO] [stdout] 46 | .post(&format!("{}/update", SERVER)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}/update", SERVER)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> clippy/src/ipc.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | / pub mod ipc { [INFO] [stdout] 3 | | use crate::write_clipboard::copy_to_unix; [INFO] [stdout] 4 | | use crate::{ [INFO] [stdout] 5 | | API_KEY, GUI_BIN, MessageChannel, MessageIPC, get_image_path, get_path_local, log_error, [INFO] [stdout] ... | [INFO] [stdout] 150 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> clippy/src/ipc.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | Ok(process.kill()?) [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] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 111 - Ok(process.kill()?) [INFO] [stdout] 111 + process.kill() [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] --> clippy/src/ipc.rs:121:17 [INFO] [stdout] | [INFO] [stdout] 121 | / match serde_json::from_str(&buf)? { [INFO] [stdout] 122 | | MessageIPC::OpentGUI => { [INFO] [stdout] 123 | | let rx = rx.clone(); [INFO] [stdout] 124 | | if let Ok(mut guard) = is_it_new.lock() { [INFO] [stdout] ... | [INFO] [stdout] 142 | | _ => {} [INFO] [stdout] 143 | | } [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] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 121 ~ if let MessageIPC::OpentGUI = serde_json::from_str(&buf)? { [INFO] [stdout] 122 + let rx = rx.clone(); [INFO] [stdout] 123 + if let Ok(mut guard) = is_it_new.lock() { [INFO] [stdout] 124 + if guard.is_none() { [INFO] [stdout] 125 + let is_it_new_clone = Arc::clone(&is_it_new); [INFO] [stdout] 126 + let rx_clone = rx.clone(); [INFO] [stdout] 127 + [INFO] [stdout] 128 + let handle = thread::spawn(move || { [INFO] [stdout] 129 + if let Err(e) = start_gui(&rx_clone) { [INFO] [stdout] 130 + error!("Error opening clippy-gui: {}", e); [INFO] [stdout] 131 + } [INFO] [stdout] 132 + [INFO] [stdout] 133 + if let Ok(mut inner) = is_it_new_clone.lock() { [INFO] [stdout] 134 + *inner = None; [INFO] [stdout] 135 + } [INFO] [stdout] 136 + }); [INFO] [stdout] 137 + *guard = Some(handle); [INFO] [stdout] 138 + } [INFO] [stdout] 139 + } [INFO] [stdout] 140 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/ipc.rs:124:25 [INFO] [stdout] | [INFO] [stdout] 124 | / if let Ok(mut guard) = is_it_new.lock() { [INFO] [stdout] 125 | | if guard.is_none() { [INFO] [stdout] 126 | | let is_it_new_clone = Arc::clone(&is_it_new); [INFO] [stdout] 127 | | let rx_clone = rx.clone(); [INFO] [stdout] ... | [INFO] [stdout] 140 | | } [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] 124 ~ if let Ok(mut guard) = is_it_new.lock() [INFO] [stdout] 125 ~ && guard.is_none() { [INFO] [stdout] 126 | let is_it_new_clone = Arc::clone(&is_it_new); [INFO] [stdout] ... [INFO] [stdout] 138 | *guard = Some(handle); [INFO] [stdout] 139 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy/src/read_clipboard.rs:73:21 [INFO] [stdout] | [INFO] [stdout] 73 | &self.tx, [INFO] [stdout] | ^^^^^^^^ help: change this to: `self.tx` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy/src/read_clipboard.rs:80:21 [INFO] [stdout] | [INFO] [stdout] 80 | &self.tx, [INFO] [stdout] | ^^^^^^^^ help: change this to: `self.tx` [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 loop could be written as a `while let` loop [INFO] [stdout] --> clippy/src/user.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | / loop { [INFO] [stdout] 38 | | let Some(usercred) = usersettings.get_sync() else { [INFO] [stdout] 39 | | break; [INFO] [stdout] 40 | | }; [INFO] [stdout] ... | [INFO] [stdout] 81 | | health(&client, rx, &user_data).await; [INFO] [stdout] 82 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(usercred) = usersettings.get_sync() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy/src/user.rs:46:44 [INFO] [stdout] | [INFO] [stdout] 46 | if let Err(e) = get_token_serv(&usercred, &client).await { [INFO] [stdout] | ^^^^^^^^^ help: change this to: `usercred` [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 can be `std::io::Error::other(_)` [INFO] [stdout] --> clippy/src/user.rs:252:32 [INFO] [stdout] | [INFO] [stdout] 252 | return Err(io::Error::new( [INFO] [stdout] | ________________________________^ [INFO] [stdout] 253 | | io::ErrorKind::Other, [INFO] [stdout] 254 | | "Error removing pending data", [INFO] [stdout] 255 | | )); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 252 ~ return Err(io::Error::other( [INFO] [stdout] 253 ~ "Error removing pending data", [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy/src/user.rs:307:61 [INFO] [stdout] | [INFO] [stdout] 307 | log_error!(user_data.remove_and_remove_file(&id)); [INFO] [stdout] | ^^^ help: change this to: `id` [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 `if` can be collapsed into the outer `match` [INFO] [stdout] --> clippy/src/user.rs:351:13 [INFO] [stdout] | [INFO] [stdout] 351 | / if ws.send(ws::Message::Pong(p)).await.is_err() { [INFO] [stdout] 352 | | return Err("Unable to send pong to server".into()); [INFO] [stdout] 353 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 350 ~ ws::Frame::Ping(p) [INFO] [stdout] 351 ~ if ws.send(ws::Message::Pong(p)).await.is_err() => { [INFO] [stdout] 352 | return Err("Unable to send pong to server".into()); [INFO] [stdout] 353 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy/src/lib.rs:85:24 [INFO] [stdout] | [INFO] [stdout] 85 | save_image(&id, &general_purpose::STANDARD.decode(&self.data).unwrap())?; [INFO] [stdout] | ^^^ help: change this to: `id` [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 can be `std::io::Error::other(_)` [INFO] [stdout] --> clippy/src/lib.rs:90:30 [INFO] [stdout] | [INFO] [stdout] 90 | .map_err(|e| io::Error::new(io::ErrorKind::Other, e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 90 - .map_err(|e| io::Error::new(io::ErrorKind::Other, e))?; [INFO] [stdout] 90 + .map_err(|e| io::Error::other(e))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> clippy/src/lib.rs:138:34 [INFO] [stdout] | [INFO] [stdout] 138 | let old_path = path.join(&format!("{}.png", old_id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}.png", old_id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> clippy/src/lib.rs:140:38 [INFO] [stdout] | [INFO] [stdout] 140 | let new_path = path.join(&format!("{}.png", new_id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("{}.png", new_id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> clippy/src/lib.rs:275:13 [INFO] [stdout] | [INFO] [stdout] 275 | / for dir in entries { [INFO] [stdout] 276 | | if let Ok(entry) = dir { [INFO] [stdout] 277 | | if let Ok(metadata) = File::open(entry.path()) { [INFO] [stdout] 278 | | if let Ok(data) = serde_json::from_reader::(metadata) { [INFO] [stdout] ... | [INFO] [stdout] 294 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> clippy/src/lib.rs:276:17 [INFO] [stdout] | [INFO] [stdout] 276 | / if let Ok(entry) = dir { [INFO] [stdout] 277 | | if let Ok(metadata) = File::open(entry.path()) { [INFO] [stdout] 278 | | if let Ok(data) = serde_json::from_reader::(metadata) { [INFO] [stdout] 279 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] ... | [INFO] [stdout] 293 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 275 ~ for entry in entries.flatten() { [INFO] [stdout] 276 + if let Ok(metadata) = File::open(entry.path()) { [INFO] [stdout] 277 + if let Ok(data) = serde_json::from_reader::(metadata) { [INFO] [stdout] 278 + if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 279 + pending.insert( [INFO] [stdout] 280 + name.to_string(), [INFO] [stdout] 281 + ( [INFO] [stdout] 282 + Edit::New { [INFO] [stdout] 283 + path: entry.path(), [INFO] [stdout] 284 + typ: data.typ, [INFO] [stdout] 285 + }, [INFO] [stdout] 286 + DataState::WaitingToSend, [INFO] [stdout] 287 + ), [INFO] [stdout] 288 + ); [INFO] [stdout] 289 + } [INFO] [stdout] 290 + } [INFO] [stdout] 291 + } [INFO] [stdout] 292 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/lib.rs:276:17 [INFO] [stdout] | [INFO] [stdout] 276 | / if let Ok(entry) = dir { [INFO] [stdout] 277 | | if let Ok(metadata) = File::open(entry.path()) { [INFO] [stdout] 278 | | if let Ok(data) = serde_json::from_reader::(metadata) { [INFO] [stdout] 279 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] ... | [INFO] [stdout] 293 | | } [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] 276 ~ if let Ok(entry) = dir [INFO] [stdout] 277 ~ && let Ok(metadata) = File::open(entry.path()) { [INFO] [stdout] 278 | if let Ok(data) = serde_json::from_reader::(metadata) { [INFO] [stdout] ... [INFO] [stdout] 291 | } [INFO] [stdout] 292 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/lib.rs:277:21 [INFO] [stdout] | [INFO] [stdout] 277 | / if let Ok(metadata) = File::open(entry.path()) { [INFO] [stdout] 278 | | if let Ok(data) = serde_json::from_reader::(metadata) { [INFO] [stdout] 279 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 280 | | pending.insert( [INFO] [stdout] ... | [INFO] [stdout] 292 | | } [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] 277 ~ if let Ok(metadata) = File::open(entry.path()) [INFO] [stdout] 278 ~ && let Ok(data) = serde_json::from_reader::(metadata) { [INFO] [stdout] 279 | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] ... [INFO] [stdout] 290 | } [INFO] [stdout] 291 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/lib.rs:278:25 [INFO] [stdout] | [INFO] [stdout] 278 | / if let Ok(data) = serde_json::from_reader::(metadata) { [INFO] [stdout] 279 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 280 | | pending.insert( [INFO] [stdout] 281 | | name.to_string(), [INFO] [stdout] ... | [INFO] [stdout] 291 | | } [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] 278 ~ if let Ok(data) = serde_json::from_reader::(metadata) [INFO] [stdout] 279 ~ && let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 280 | pending.insert( [INFO] [stdout] ... [INFO] [stdout] 289 | ); [INFO] [stdout] 290 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> clippy/src/lib.rs:301:13 [INFO] [stdout] | [INFO] [stdout] 301 | / for dir in entries { [INFO] [stdout] 302 | | if let Ok(entry) = dir { [INFO] [stdout] 303 | | if let Ok(metadata) = entry.metadata() { [INFO] [stdout] 304 | | if metadata.is_file() { [INFO] [stdout] ... | [INFO] [stdout] 311 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> clippy/src/lib.rs:302:17 [INFO] [stdout] | [INFO] [stdout] 302 | / if let Ok(entry) = dir { [INFO] [stdout] 303 | | if let Ok(metadata) = entry.metadata() { [INFO] [stdout] 304 | | if metadata.is_file() { [INFO] [stdout] 305 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] ... | [INFO] [stdout] 310 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 301 ~ for entry in entries.flatten() { [INFO] [stdout] 302 + if let Ok(metadata) = entry.metadata() { [INFO] [stdout] 303 + if metadata.is_file() { [INFO] [stdout] 304 + if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 305 + data.insert(name.to_string()); [INFO] [stdout] 306 + } [INFO] [stdout] 307 + } [INFO] [stdout] 308 + } [INFO] [stdout] 309 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/lib.rs:302:17 [INFO] [stdout] | [INFO] [stdout] 302 | / if let Ok(entry) = dir { [INFO] [stdout] 303 | | if let Ok(metadata) = entry.metadata() { [INFO] [stdout] 304 | | if metadata.is_file() { [INFO] [stdout] 305 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] ... | [INFO] [stdout] 310 | | } [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] 302 ~ if let Ok(entry) = dir [INFO] [stdout] 303 ~ && let Ok(metadata) = entry.metadata() { [INFO] [stdout] 304 | if metadata.is_file() { [INFO] [stdout] ... [INFO] [stdout] 308 | } [INFO] [stdout] 309 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/lib.rs:303:21 [INFO] [stdout] | [INFO] [stdout] 303 | / if let Ok(metadata) = entry.metadata() { [INFO] [stdout] 304 | | if metadata.is_file() { [INFO] [stdout] 305 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 306 | | data.insert(name.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 309 | | } [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] 303 ~ if let Ok(metadata) = entry.metadata() [INFO] [stdout] 304 ~ && metadata.is_file() { [INFO] [stdout] 305 | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 306 | data.insert(name.to_string()); [INFO] [stdout] 307 | } [INFO] [stdout] 308 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/lib.rs:304:25 [INFO] [stdout] | [INFO] [stdout] 304 | / if metadata.is_file() { [INFO] [stdout] 305 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 306 | | data.insert(name.to_string()); [INFO] [stdout] 307 | | } [INFO] [stdout] 308 | | } [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] 304 ~ if metadata.is_file() [INFO] [stdout] 305 ~ && let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 306 | data.insert(name.to_string()); [INFO] [stdout] 307 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> clippy/src/lib.rs:329:17 [INFO] [stdout] | [INFO] [stdout] 329 | let val = self.pending.lock().unwrap(); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> clippy/src/lib.rs:346:36 [INFO] [stdout] | [INFO] [stdout] 346 | self.notify.notified().await; [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] = note: `#[warn(clippy::await_holding_lock)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> clippy/src/lib.rs:434:17 [INFO] [stdout] | [INFO] [stdout] 434 | return Err(e.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] 434 - return Err(e.into()); [INFO] [stdout] 434 + Err(e.into()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::io::Error` [INFO] [stdout] --> clippy/src/lib.rs:434:28 [INFO] [stdout] | [INFO] [stdout] 434 | return Err(e.into()); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UserSettings` [INFO] [stdout] --> clippy/src/lib.rs:491:5 [INFO] [stdout] | [INFO] [stdout] 491 | / pub fn new() -> Self { [INFO] [stdout] 492 | | Self { [INFO] [stdout] 493 | | sync: None, [INFO] [stdout] 494 | | disable_sync: false, [INFO] [stdout] ... | [INFO] [stdout] 504 | | } [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] 490 + impl Default for UserSettings { [INFO] [stdout] 491 + fn default() -> Self { [INFO] [stdout] 492 + Self::new() [INFO] [stdout] 493 + } [INFO] [stdout] 494 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> clippy/src/lib.rs:519:10 [INFO] [stdout] | [INFO] [stdout] 519 | !(self.sync == None) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `self.sync.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> clippy/src/lib.rs:548:20 [INFO] [stdout] | [INFO] [stdout] 548 | let file = if let Ok(data) = fs::read(&user_config) { [INFO] [stdout] | ____________________^ [INFO] [stdout] 549 | | Some(data) [INFO] [stdout] 550 | | } else { [INFO] [stdout] 551 | | None [INFO] [stdout] 552 | | }; [INFO] [stdout] | |_________^ help: replace with: `fs::read(&user_config).ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/lib.rs:590:13 [INFO] [stdout] | [INFO] [stdout] 590 | / if user_config.is_file() { [INFO] [stdout] 591 | | if let Err(e) = fs::remove_file(&user_config) { [INFO] [stdout] 592 | | error!("Unable to store settings"); [INFO] [stdout] 593 | | debug!("{}", e); [INFO] [stdout] 594 | | }; [INFO] [stdout] 595 | | } [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] 590 ~ if user_config.is_file() [INFO] [stdout] 591 ~ && let Err(e) = fs::remove_file(&user_config) { [INFO] [stdout] 592 | error!("Unable to store settings"); [INFO] [stdout] 593 | debug!("{}", e); [INFO] [stdout] 594 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> clippy/src/lib.rs:765:9 [INFO] [stdout] | [INFO] [stdout] 765 | return path; [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] 765 - return path; [INFO] [stdout] 765 + path [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> clippy/src/lib.rs:796:9 [INFO] [stdout] | [INFO] [stdout] 796 | return path; [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] 796 - return path; [INFO] [stdout] 796 + path [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> clippy/src/lib.rs:829:9 [INFO] [stdout] | [INFO] [stdout] 829 | return path; [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] 829 - return path; [INFO] [stdout] 829 + path [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do [INFO] [stdout] --> clippy/src/lib.rs:970:27 [INFO] [stdout] | [INFO] [stdout] 970 | pub fn get_image_path(id: &PathBuf) -> Option { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 970 - pub fn get_image_path(id: &PathBuf) -> Option { [INFO] [stdout] 970 + pub fn get_image_path(id: &Path) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression will always return true [INFO] [stdout] --> clippy/src/lib.rs:1084:5 [INFO] [stdout] | [INFO] [stdout] 1084 | / if otp.len() == 6 && otp.chars().all(|x| x.is_ascii_digit()) { [INFO] [stdout] 1085 | | true [INFO] [stdout] 1086 | | } else { [INFO] [stdout] 1087 | | true [INFO] [stdout] 1088 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> clippy/src/lib.rs:1084:66 [INFO] [stdout] | [INFO] [stdout] 1084 | if otp.len() == 6 && otp.chars().all(|x| x.is_ascii_digit()) { [INFO] [stdout] | __________________________________________________________________^ [INFO] [stdout] 1085 | | true [INFO] [stdout] 1086 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> clippy/src/lib.rs:1086:12 [INFO] [stdout] | [INFO] [stdout] 1086 | } else { [INFO] [stdout] | ____________^ [INFO] [stdout] 1087 | | true [INFO] [stdout] 1088 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> clippy/src/lib.rs:1092:57 [INFO] [stdout] | [INFO] [stdout] 1092 | if let Err(err) = fs::rename(&path, get_path().join(&time)) { [INFO] [stdout] | ^^^^^ help: change this to: `time` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> clippy/src/lib.rs:1096:5 [INFO] [stdout] | [INFO] [stdout] 1096 | / if thumbnail && typ.starts_with("image/") { [INFO] [stdout] 1097 | | if let Some(file_name) = path.file_name().and_then(|n| n.to_str()) { [INFO] [stdout] 1098 | | let image_path = get_path_image(); [INFO] [stdout] 1099 | | let old_img_file_name = format!("{}.png", file_name); [INFO] [stdout] ... | [INFO] [stdout] 1107 | | } [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] 1096 ~ if thumbnail && typ.starts_with("image/") [INFO] [stdout] 1097 ~ && let Some(file_name) = path.file_name().and_then(|n| n.to_str()) { [INFO] [stdout] 1098 | let image_path = get_path_image(); [INFO] [stdout] ... [INFO] [stdout] 1105 | } [INFO] [stdout] 1106 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy/src/lib.rs:1118:41 [INFO] [stdout] | [INFO] [stdout] 1118 | let image = image::load_from_memory(&data).map_err(|e| { [INFO] [stdout] | ^^^^^ help: change this to: `data` [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 can be `std::io::Error::other(_)` [INFO] [stdout] --> clippy/src/lib.rs:1129:22 [INFO] [stdout] | [INFO] [stdout] 1129 | .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Image write error: {e}")))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 1129 - .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("Image write error: {e}")))?; [INFO] [stdout] 1129 + .map_err(|e| io::Error::other(format!("Image write error: {e}")))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [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 clippy-server v0.1.5 (/opt/rustwide/workdir/clippy-server) [INFO] [stdout] warning: unused variable: `room` [INFO] [stdout] --> clippy-server/src/ws_connection.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | room: web::Data, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_room` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `edit` [INFO] [stdout] --> clippy-server/src/ws_connection.rs:210:17 [INFO] [stdout] | [INFO] [stdout] 210 | if let Some(edit) = is_it_edit { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_edit` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `room` [INFO] [stdout] --> clippy-server/src/ws_connection.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | room: web::Data, [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_room` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `edit` [INFO] [stdout] --> clippy-server/src/ws_connection.rs:210:17 [INFO] [stdout] | [INFO] [stdout] 210 | if let Some(edit) = is_it_edit { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_edit` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> clippy-server/src/ws_connection.rs:188:1 [INFO] [stdout] | [INFO] [stdout] 188 | / async fn handle_bin( [INFO] [stdout] 189 | | user: &str, [INFO] [stdout] 190 | | state: &actix_web::web::Data, [INFO] [stdout] 191 | | tx: &Sender, [INFO] [stdout] ... | [INFO] [stdout] 197 | | is_it_edit: Option, [INFO] [stdout] 198 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy-server/src/ws_connection.rs:208:18 [INFO] [stdout] | [INFO] [stdout] 208 | state.update(&user, &file_name); [INFO] [stdout] | ^^^^^ help: change this to: `user` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy-server/src/ws_connection.rs:216:35 [INFO] [stdout] | [INFO] [stdout] 216 | state.remove_and_add_edit(&user, &id).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `user` [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: the borrowed expression implements the required traits [INFO] [stdout] --> clippy-server/src/ws_connection.rs:240:26 [INFO] [stdout] | [INFO] [stdout] 240 | match File::open(&path) { [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UserState` [INFO] [stdout] --> clippy-server/src/lib.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | / pub fn new() -> Self { [INFO] [stdout] 48 | | Self { [INFO] [stdout] 49 | | data: Arc::new(Mutex::new(HashMap::new())), [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#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 46 + impl Default for UserState { [INFO] [stdout] 47 + fn default() -> Self { [INFO] [stdout] 48 + Self::new() [INFO] [stdout] 49 + } [INFO] [stdout] 50 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` [INFO] [stdout] --> clippy-server/src/lib.rs:196:23 [INFO] [stdout] | [INFO] [stdout] 196 | let mut map = self.data.lock().or_else(|_| Err("Unable to lock cred"))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.data.lock().map_err(|_| "Unable to lock cred")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> clippy-server/src/lib.rs:197:20 [INFO] [stdout] | [INFO] [stdout] 197 | let tree = map [INFO] [stdout] | ____________________^ [INFO] [stdout] 198 | | .get_mut(username) [INFO] [stdout] 199 | | .ok_or_else(|| "Unable to identify user")?; [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] 199 - .ok_or_else(|| "Unable to identify user")?; [INFO] [stdout] 199 + .ok_or("Unable to identify user")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `EmailState` [INFO] [stdout] --> clippy-server/src/lib.rs:216:5 [INFO] [stdout] | [INFO] [stdout] 216 | / pub fn new() -> Self { [INFO] [stdout] 217 | | Self { [INFO] [stdout] 218 | | data: Arc::new(Mutex::new(Vec::new())), [INFO] [stdout] 219 | | } [INFO] [stdout] 220 | | } [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] 215 + impl Default for EmailState { [INFO] [stdout] 216 + fn default() -> Self { [INFO] [stdout] 217 + Self::new() [INFO] [stdout] 218 + } [INFO] [stdout] 219 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> clippy-server/src/lib.rs:253:9 [INFO] [stdout] | [INFO] [stdout] 253 | if key == self.key { true } else { false } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `key == self.key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy-server/src/lib.rs:373:9 [INFO] [stdout] | [INFO] [stdout] 373 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> clippy-server/src/lib.rs:382:11 [INFO] [stdout] | [INFO] [stdout] 382 | data: Arc>>, [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: you should consider adding a `Default` implementation for `OTPState` [INFO] [stdout] --> clippy-server/src/lib.rs:386:5 [INFO] [stdout] | [INFO] [stdout] 386 | / pub fn new() -> Self { [INFO] [stdout] 387 | | Self { [INFO] [stdout] 388 | | data: Arc::new(Mutex::new(HashMap::new())), [INFO] [stdout] 389 | | } [INFO] [stdout] 390 | | } [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] 385 + impl Default for OTPState { [INFO] [stdout] 386 + fn default() -> Self { [INFO] [stdout] 387 + Self::new() [INFO] [stdout] 388 + } [INFO] [stdout] 389 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RoomManager` [INFO] [stdout] --> clippy-server/src/lib.rs:444:5 [INFO] [stdout] | [INFO] [stdout] 444 | / pub fn new() -> Self { [INFO] [stdout] 445 | | Self { [INFO] [stdout] 446 | | room: sync::Mutex::new(HashMap::new()), [INFO] [stdout] 447 | | } [INFO] [stdout] 448 | | } [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] 443 + impl Default for RoomManager { [INFO] [stdout] 444 + fn default() -> Self { [INFO] [stdout] 445 + Self::new() [INFO] [stdout] 446 + } [INFO] [stdout] 447 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (9/7) [INFO] [stdout] --> clippy-server/src/ws_connection.rs:188:1 [INFO] [stdout] | [INFO] [stdout] 188 | / async fn handle_bin( [INFO] [stdout] 189 | | user: &str, [INFO] [stdout] 190 | | state: &actix_web::web::Data, [INFO] [stdout] 191 | | tx: &Sender, [INFO] [stdout] ... | [INFO] [stdout] 197 | | is_it_edit: Option, [INFO] [stdout] 198 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy-server/src/ws_connection.rs:208:18 [INFO] [stdout] | [INFO] [stdout] 208 | state.update(&user, &file_name); [INFO] [stdout] | ^^^^^ help: change this to: `user` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy-server/src/ws_connection.rs:216:35 [INFO] [stdout] | [INFO] [stdout] 216 | state.remove_and_add_edit(&user, &id).unwrap(); [INFO] [stdout] | ^^^^^ help: change this to: `user` [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: the borrowed expression implements the required traits [INFO] [stdout] --> clippy-server/src/ws_connection.rs:240:26 [INFO] [stdout] | [INFO] [stdout] 240 | match File::open(&path) { [INFO] [stdout] | ^^^^^ help: change this to: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `UserState` [INFO] [stdout] --> clippy-server/src/lib.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | / pub fn new() -> Self { [INFO] [stdout] 48 | | Self { [INFO] [stdout] 49 | | data: Arc::new(Mutex::new(HashMap::new())), [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#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 46 + impl Default for UserState { [INFO] [stdout] 47 + fn default() -> Self { [INFO] [stdout] 48 + Self::new() [INFO] [stdout] 49 + } [INFO] [stdout] 50 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` [INFO] [stdout] --> clippy-server/src/lib.rs:196:23 [INFO] [stdout] | [INFO] [stdout] 196 | let mut map = self.data.lock().or_else(|_| Err("Unable to lock cred"))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.data.lock().map_err(|_| "Unable to lock cred")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> clippy-server/src/lib.rs:197:20 [INFO] [stdout] | [INFO] [stdout] 197 | let tree = map [INFO] [stdout] | ____________________^ [INFO] [stdout] 198 | | .get_mut(username) [INFO] [stdout] 199 | | .ok_or_else(|| "Unable to identify user")?; [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] 199 - .ok_or_else(|| "Unable to identify user")?; [INFO] [stdout] 199 + .ok_or("Unable to identify user")?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `EmailState` [INFO] [stdout] --> clippy-server/src/lib.rs:216:5 [INFO] [stdout] | [INFO] [stdout] 216 | / pub fn new() -> Self { [INFO] [stdout] 217 | | Self { [INFO] [stdout] 218 | | data: Arc::new(Mutex::new(Vec::new())), [INFO] [stdout] 219 | | } [INFO] [stdout] 220 | | } [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] 215 + impl Default for EmailState { [INFO] [stdout] 216 + fn default() -> Self { [INFO] [stdout] 217 + Self::new() [INFO] [stdout] 218 + } [INFO] [stdout] 219 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this if-then-else expression returns a bool literal [INFO] [stdout] --> clippy-server/src/lib.rs:253:9 [INFO] [stdout] | [INFO] [stdout] 253 | if key == self.key { true } else { false } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `key == self.key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stdout] = note: `#[warn(clippy::needless_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> clippy-server/src/lib.rs:373:9 [INFO] [stdout] | [INFO] [stdout] 373 | &key, [INFO] [stdout] | ^^^^ help: change this to: `key` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> clippy-server/src/lib.rs:382:11 [INFO] [stdout] | [INFO] [stdout] 382 | data: Arc>>, [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: you should consider adding a `Default` implementation for `OTPState` [INFO] [stdout] --> clippy-server/src/lib.rs:386:5 [INFO] [stdout] | [INFO] [stdout] 386 | / pub fn new() -> Self { [INFO] [stdout] 387 | | Self { [INFO] [stdout] 388 | | data: Arc::new(Mutex::new(HashMap::new())), [INFO] [stdout] 389 | | } [INFO] [stdout] 390 | | } [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] 385 + impl Default for OTPState { [INFO] [stdout] 386 + fn default() -> Self { [INFO] [stdout] 387 + Self::new() [INFO] [stdout] 388 + } [INFO] [stdout] 389 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `RoomManager` [INFO] [stdout] --> clippy-server/src/lib.rs:444:5 [INFO] [stdout] | [INFO] [stdout] 444 | / pub fn new() -> Self { [INFO] [stdout] 445 | | Self { [INFO] [stdout] 446 | | room: sync::Mutex::new(HashMap::new()), [INFO] [stdout] 447 | | } [INFO] [stdout] 448 | | } [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] 443 + impl Default for RoomManager { [INFO] [stdout] 444 + fn default() -> Self { [INFO] [stdout] 445 + Self::new() [INFO] [stdout] 446 + } [INFO] [stdout] 447 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> clippy-server/src/main.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | if new_user [INFO] [stdout] | ________^ [INFO] [stdout] 29 | | .email [INFO] [stdout] 30 | | .as_ref() [INFO] [stdout] 31 | | .map_or(true, |va| !is_valid_email(va)) [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 31 - .map_or(true, |va| !is_valid_email(va)) [INFO] [stdout] 31 + .is_none_or(|va| !is_valid_email(va)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> clippy-server/src/main.rs:97:17 [INFO] [stdout] | [INFO] [stdout] 97 | return HttpResponse::Unauthorized().body("Unable to veriify otp"); [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] 97 - return HttpResponse::Unauthorized().body("Unable to veriify otp"); [INFO] [stdout] 97 + HttpResponse::Unauthorized().body("Unable to veriify otp") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> clippy-server/src/main.rs:99:38 [INFO] [stdout] | [INFO] [stdout] 99 | CustomErr::Failed(er) => return HttpResponse::Unauthorized().body(er), [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] 99 - CustomErr::Failed(er) => return HttpResponse::Unauthorized().body(er), [INFO] [stdout] 99 + CustomErr::Failed(er) => HttpResponse::Unauthorized().body(er), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> clippy-server/src/main.rs:128:56 [INFO] [stdout] | [INFO] [stdout] 128 | .body(format!("User not found: {}", err.to_string())); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> clippy-server/src/main.rs:181:18 [INFO] [stdout] | [INFO] [stdout] 181 | .map_err(|e| actix_web::error::ErrorInternalServerError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `actix_web::error::ErrorInternalServerError` [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 `map_or` can be simplified [INFO] [stdout] --> clippy-server/src/main.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | if new_user [INFO] [stdout] | ________^ [INFO] [stdout] 29 | | .email [INFO] [stdout] 30 | | .as_ref() [INFO] [stdout] 31 | | .map_or(true, |va| !is_valid_email(va)) [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_none_or` instead [INFO] [stdout] | [INFO] [stdout] 31 - .map_or(true, |va| !is_valid_email(va)) [INFO] [stdout] 31 + .is_none_or(|va| !is_valid_email(va)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> clippy-server/src/main.rs:97:17 [INFO] [stdout] | [INFO] [stdout] 97 | return HttpResponse::Unauthorized().body("Unable to veriify otp"); [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] 97 - return HttpResponse::Unauthorized().body("Unable to veriify otp"); [INFO] [stdout] 97 + HttpResponse::Unauthorized().body("Unable to veriify otp") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> clippy-server/src/main.rs:99:38 [INFO] [stdout] | [INFO] [stdout] 99 | CustomErr::Failed(er) => return HttpResponse::Unauthorized().body(er), [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] 99 - CustomErr::Failed(er) => return HttpResponse::Unauthorized().body(er), [INFO] [stdout] 99 + CustomErr::Failed(er) => HttpResponse::Unauthorized().body(er), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> clippy-server/src/main.rs:128:56 [INFO] [stdout] | [INFO] [stdout] 128 | .body(format!("User not found: {}", err.to_string())); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> clippy-server/src/main.rs:181:18 [INFO] [stdout] | [INFO] [stdout] 181 | .map_err(|e| actix_web::error::ErrorInternalServerError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `actix_web::error::ErrorInternalServerError` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 5m 35s [INFO] running `Command { std: "docker" "inspect" "d099554176c3806b8fb2bef759a4b092a43e96a6709eca917c6ed486f201c29c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d099554176c3806b8fb2bef759a4b092a43e96a6709eca917c6ed486f201c29c", kill_on_drop: false }` [INFO] [stdout] d099554176c3806b8fb2bef759a4b092a43e96a6709eca917c6ed486f201c29c