[INFO] cloning repository https://github.com/ryanscofield03/COSC473-Rust-File-Sharing-Decentralised-App [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ryanscofield03/COSC473-Rust-File-Sharing-Decentralised-App" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fryanscofield03%2FCOSC473-Rust-File-Sharing-Decentralised-App", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fryanscofield03%2FCOSC473-Rust-File-Sharing-Decentralised-App'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 55d2cc33263aae937480fbe869a3bf202ab89a20 [INFO] linting ryanscofield03/COSC473-Rust-File-Sharing-Decentralised-App against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fryanscofield03%2FCOSC473-Rust-File-Sharing-Decentralised-App" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/ryanscofield03/COSC473-Rust-File-Sharing-Decentralised-App [INFO] finished tweaking git repo https://github.com/ryanscofield03/COSC473-Rust-File-Sharing-Decentralised-App [INFO] tweaked toml for git repo https://github.com/ryanscofield03/COSC473-Rust-File-Sharing-Decentralised-App written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/ryanscofield03/COSC473-Rust-File-Sharing-Decentralised-App 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/ryanscofield03/COSC473-Rust-File-Sharing-Decentralised-App already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded igd-next v0.15.1 [INFO] [stderr] Downloaded asn1_der v0.7.6 [INFO] [stderr] Downloaded data-encoding-macro v0.1.17 [INFO] [stderr] Downloaded data-encoding-macro-internal v0.1.15 [INFO] [stderr] Downloaded libp2p-upnp v0.4.0 [INFO] [stderr] Downloaded libp2p-identity v0.2.10 [INFO] [stderr] Downloaded hostname v0.4.0 [INFO] [stderr] Downloaded libp2p-core v0.43.0 [INFO] [stderr] Downloaded libp2p-allow-block-list v0.5.0 [INFO] [stderr] Downloaded libp2p-autonat v0.14.0 [INFO] [stderr] Downloaded libp2p-relay v0.19.0 [INFO] [stderr] Downloaded hickory-resolver v0.25.0-alpha.5 [INFO] [stderr] Downloaded libp2p-swarm v0.46.0 [INFO] [stderr] Downloaded libp2p-kad v0.47.0 [INFO] [stderr] Downloaded libp2p-rendezvous v0.16.0 [INFO] [stderr] Downloaded libp2p-gossipsub v0.48.0 [INFO] [stderr] Downloaded generator v0.8.4 [INFO] [stderr] Downloaded libp2p-mdns v0.47.0 [INFO] [stderr] Downloaded rustls-webpki v0.103.0 [INFO] [stderr] Downloaded libp2p-metrics v0.16.0 [INFO] [stderr] Downloaded libp2p-tls v0.6.1 [INFO] [stderr] Downloaded libp2p-quic v0.12.0 [INFO] [stderr] Downloaded cbor4ii v0.3.3 [INFO] [stderr] Downloaded libp2p-request-response v0.28.0 [INFO] [stderr] Downloaded libp2p-tcp v0.43.0 [INFO] [stderr] Downloaded libp2p-connection-limits v0.5.0 [INFO] [stderr] Downloaded resolv-conf v0.7.1 [INFO] [stderr] Downloaded libp2p-dns v0.43.0 [INFO] [stderr] Downloaded hickory-proto v0.25.0-alpha.5 [INFO] [stderr] Downloaded libp2p-identify v0.46.0 [INFO] [stderr] Downloaded libp2p-noise v0.46.0 [INFO] [stderr] Downloaded libp2p-ping v0.46.0 [INFO] [stderr] Downloaded libp2p v0.55.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] e1116d983e854b3db2ec5b2a3382bccd3c614a549578b0c3512c5246442f384d [INFO] running `Command { std: "docker" "start" "-a" "e1116d983e854b3db2ec5b2a3382bccd3c614a549578b0c3512c5246442f384d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e1116d983e854b3db2ec5b2a3382bccd3c614a549578b0c3512c5246442f384d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e1116d983e854b3db2ec5b2a3382bccd3c614a549578b0c3512c5246442f384d", kill_on_drop: false }` [INFO] [stdout] e1116d983e854b3db2ec5b2a3382bccd3c614a549578b0c3512c5246442f384d [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] b969df2b9a1385c8731603a395663f4dc520b9566389cfc7813fae6a30a547e4 [INFO] running `Command { std: "docker" "start" "-a" "b969df2b9a1385c8731603a395663f4dc520b9566389cfc7813fae6a30a547e4", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.171 [INFO] [stderr] Checking smallvec v1.14.0 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Checking once_cell v1.21.1 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling yoke-derive v0.7.5 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling zeroize_derive v1.4.2 [INFO] [stderr] Compiling zerovec-derive v0.10.3 [INFO] [stderr] Compiling icu_provider_macros v1.5.0 [INFO] [stderr] Compiling tracing-attributes v0.1.28 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Compiling curve25519-dalek v4.1.3 [INFO] [stderr] Checking tracing-core v0.1.33 [INFO] [stderr] Compiling pin-project-internal v1.1.10 [INFO] [stderr] Compiling curve25519-dalek-derive v0.1.1 [INFO] [stderr] Checking unsigned-varint v0.8.0 [INFO] [stderr] Checking signature v2.2.0 [INFO] [stderr] Compiling data-encoding v2.8.0 [INFO] [stderr] Checking ed25519 v2.2.3 [INFO] [stderr] Checking zeroize v1.8.1 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Checking asn1_der v0.7.6 [INFO] [stderr] Checking bs58 v0.5.1 [INFO] [stderr] Checking unsigned-varint v0.7.2 [INFO] [stderr] Checking lru v0.12.5 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling libp2p-swarm-derive v0.35.0 [INFO] [stderr] Checking deranged v0.4.1 [INFO] [stderr] Compiling rustls v0.23.25 [INFO] [stderr] Compiling asn1-rs-derive v0.5.1 [INFO] [stderr] Compiling asn1-rs-impl v0.2.0 [INFO] [stderr] Compiling async-trait v0.1.88 [INFO] [stderr] Checking thiserror v2.0.12 [INFO] [stderr] Compiling oid-registry v0.7.1 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Compiling data-encoding-macro-internal v0.1.15 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking netlink-packet-utils v0.5.2 [INFO] [stderr] Checking concurrent-queue v2.5.0 [INFO] [stderr] Compiling quinn-udp v0.5.11 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking netlink-packet-core v0.7.0 [INFO] [stderr] Compiling crunchy v0.2.3 [INFO] [stderr] Checking pin-project v1.1.10 [INFO] [stderr] Checking ahash v0.8.11 [INFO] [stderr] Checking event-listener v5.4.0 [INFO] [stderr] Checking pem v3.0.5 [INFO] [stderr] Compiling quinn v0.11.7 [INFO] [stderr] Compiling snow v0.9.6 [INFO] [stderr] Checking data-encoding-macro v0.1.17 [INFO] [stderr] Compiling prometheus-client v0.22.3 [INFO] [stderr] Checking yoke v0.7.5 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking multibase v0.9.1 [INFO] [stderr] Compiling enum-as-inner v0.6.1 [INFO] [stderr] Compiling async-recursion v1.1.1 [INFO] [stderr] Checking event-listener-strategy v0.5.3 [INFO] [stderr] Compiling prometheus-client-derive-encode v0.4.2 [INFO] [stderr] Checking dtoa v1.0.10 [INFO] [stderr] Checking hex v0.4.3 [INFO] [stderr] Compiling darling_core v0.20.10 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Checking zerovec v0.10.4 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking signal-hook-registry v1.4.2 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking mio v1.0.3 [INFO] [stderr] Checking socket2 v0.5.8 [INFO] [stderr] Checking time v0.3.41 [INFO] [stderr] Checking getrandom v0.3.2 [INFO] [stderr] Checking netlink-packet-route v0.17.1 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking nix v0.26.4 [INFO] [stderr] Checking hashlink v0.9.1 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking signal-hook v0.3.17 [INFO] [stderr] Checking uint v0.10.0 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking async-channel v2.3.1 [INFO] [stderr] Checking bimap v0.6.3 [INFO] [stderr] Checking hex_fmt v0.3.0 [INFO] [stderr] Checking signal-hook-mio v0.2.4 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Compiling convert_case v0.7.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling rustix v1.0.5 [INFO] [stderr] Checking rustix v0.38.44 [INFO] [stderr] Checking cipher v0.4.4 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking sha2 v0.10.8 [INFO] [stderr] Checking hkdf v0.12.4 [INFO] [stderr] Checking tinystr v0.7.6 [INFO] [stderr] Checking icu_collections v1.5.0 [INFO] [stderr] Checking rand v0.9.0 [INFO] [stderr] Checking asn1-rs v0.6.2 [INFO] [stderr] Checking yasna v0.5.2 [INFO] [stderr] Compiling derive_more-impl v2.0.1 [INFO] [stderr] Checking universal-hash v0.5.1 [INFO] [stderr] Checking icu_locid v1.5.0 [INFO] [stderr] Compiling strum_macros v0.26.4 [INFO] [stderr] Checking castaway v0.2.3 [INFO] [stderr] Checking poly1305 v0.8.0 [INFO] [stderr] Checking compact_str v0.8.1 [INFO] [stderr] Checking unicode-truncate v1.1.0 [INFO] [stderr] Checking crossterm v0.28.1 [INFO] [stderr] Checking ed25519-dalek v2.1.1 [INFO] [stderr] Checking x25519-dalek v2.0.1 [INFO] [stderr] Checking chacha20 v0.9.1 [INFO] [stderr] Checking aead v0.5.2 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking futures-bounded v0.2.4 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking thread_local v1.1.8 [INFO] [stderr] Checking iana-time-zone v0.1.62 [INFO] [stderr] Checking icu_provider v1.5.0 [INFO] [stderr] Checking der-parser v9.0.0 [INFO] [stderr] Checking half v1.8.3 [INFO] [stderr] Checking tracing-subscriber v0.3.19 [INFO] [stderr] Checking rustls-webpki v0.103.0 [INFO] [stderr] Checking rustls-webpki v0.101.7 [INFO] [stderr] Checking rcgen v0.13.2 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking derive_more v2.0.1 [INFO] [stderr] Checking chacha20poly1305 v0.10.1 [INFO] [stderr] Checking chrono v0.4.40 [INFO] [stderr] Checking textwrap v0.16.2 [INFO] [stderr] Checking crossterm v0.29.0 [INFO] [stderr] Checking rw-stream-sink v0.4.0 [INFO] [stderr] Checking yamux v0.13.4 [INFO] [stderr] Checking yamux v0.12.1 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking x509-parser v0.16.0 [INFO] [stderr] Checking icu_locid_transform v1.5.0 [INFO] [stderr] Compiling darling_macro v0.20.10 [INFO] [stderr] Checking strum v0.26.3 [INFO] [stderr] Compiling darling v0.20.10 [INFO] [stderr] Compiling instability v0.3.7 [INFO] [stderr] Checking icu_properties v1.5.1 [INFO] [stderr] Checking ratatui v0.29.0 [INFO] [stderr] Checking bytes v1.10.1 [INFO] [stderr] Checking multihash v0.19.3 [INFO] [stderr] Checking cbor4ii v0.3.3 [INFO] [stderr] Checking serde_cbor v0.11.2 [INFO] [stderr] Checking libp2p-identity v0.2.10 [INFO] [stderr] Checking icu_normalizer v1.5.0 [INFO] [stderr] Checking futures-rustls v0.26.0 [INFO] [stderr] Checking tokio v1.44.2 [INFO] [stderr] Checking multistream-select v0.13.0 [INFO] [stderr] Checking asynchronous-codec v0.7.0 [INFO] [stderr] Checking quinn-proto v0.11.10 [INFO] [stderr] Checking idna_adapter v1.2.0 [INFO] [stderr] Checking quick-protobuf-codec v0.3.1 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking multiaddr v0.18.2 [INFO] [stderr] Checking hickory-proto v0.25.0-alpha.5 [INFO] [stderr] Checking libp2p-core v0.43.0 [INFO] [stderr] Checking libp2p-tls v0.6.1 [INFO] [stderr] Checking libp2p-yamux v0.47.0 [INFO] [stderr] Checking libp2p-noise v0.46.0 [INFO] [stderr] Checking libp2p-swarm v0.46.0 [INFO] [stderr] Checking netlink-sys v0.8.7 [INFO] [stderr] Checking netlink-proto v0.11.5 [INFO] [stderr] Checking rtnetlink v0.13.1 [INFO] [stderr] Checking if-watch v3.2.1 [INFO] [stderr] Checking libp2p-tcp v0.43.0 [INFO] [stderr] Checking libp2p-quic v0.12.0 [INFO] [stderr] Checking libp2p-request-response v0.28.0 [INFO] [stderr] Checking libp2p-identify v0.46.0 [INFO] [stderr] Checking libp2p-gossipsub v0.48.0 [INFO] [stderr] Checking libp2p-mdns v0.47.0 [INFO] [stderr] Checking libp2p-relay v0.19.0 [INFO] [stderr] Checking libp2p-connection-limits v0.5.0 [INFO] [stderr] Checking libp2p-allow-block-list v0.5.0 [INFO] [stderr] Checking libp2p-kad v0.47.0 [INFO] [stderr] Checking libp2p-ping v0.46.0 [INFO] [stderr] Checking libp2p-autonat v0.14.0 [INFO] [stderr] Checking libp2p-rendezvous v0.16.0 [INFO] [stderr] Checking libp2p v0.55.0 [INFO] [stderr] Checking client v0.1.0 (/opt/rustwide/workdir/client) [INFO] [stderr] Checking server v0.1.0 (/opt/rustwide/workdir/server) [INFO] [stdout] warning: unused import: `crate::network::Event::SystemMessage` [INFO] [stdout] --> client/src/network.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | use crate::network::Event::SystemMessage; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::network::Event::SystemMessage` [INFO] [stdout] --> client/src/network.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | use crate::network::Event::SystemMessage; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `tokio::time::Instant` [INFO] [stdout] --> client/src/peer_info.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use tokio::time::Instant; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `tokio::time::Instant` [INFO] [stdout] --> client/src/peer_info.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use tokio::time::Instant; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `lines.lines().count().saturating_sub((height) as usize)` is never smaller than `0` and has therefore no effect [INFO] [stdout] --> client/src/ui.rs:234:5 [INFO] [stdout] | [INFO] [stdout] 234 | lines.lines().count().saturating_sub((height) as usize).max(0) as u16 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lines.lines().count().saturating_sub((height) as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] = note: `#[warn(clippy::unnecessary_min_or_max)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> client/src/network.rs:248:16 [INFO] [stdout] | [INFO] [stdout] 248 | if let Err(_) = self.sender.send(command).await { [INFO] [stdout] | -------^^^^^^---------------------------------- help: try: `if self.sender.send(command).await.is_err()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> client/src/network.rs:254:16 [INFO] [stdout] | [INFO] [stdout] 254 | if let Err(_) = receiver.await { [INFO] [stdout] | -------^^^^^^----------------- help: try: `if receiver.await.is_err()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PublicKey` which implements the `Copy` trait [INFO] [stdout] --> client/src/network.rs:687:29 [INFO] [stdout] | [INFO] [stdout] 687 | ... other_public_key.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*other_public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `lines.lines().count().saturating_sub((height) as usize)` is never smaller than `0` and has therefore no effect [INFO] [stdout] --> client/src/ui.rs:234:5 [INFO] [stdout] | [INFO] [stdout] 234 | lines.lines().count().saturating_sub((height) as usize).max(0) as u16 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `lines.lines().count().saturating_sub((height) as usize)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] = note: `#[warn(clippy::unnecessary_min_or_max)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PublicKey` which implements the `Copy` trait [INFO] [stdout] --> client/src/network.rs:800:29 [INFO] [stdout] | [INFO] [stdout] 800 | ... other_public_key.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*other_public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> client/src/network.rs:1079:74 [INFO] [stdout] | [INFO] [stdout] 1079 | format!("Failed to subscribe to pubsub '{}'", 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: this let-binding has unit value [INFO] [stdout] --> client/src/network.rs:1089:17 [INFO] [stdout] | [INFO] [stdout] 1089 | / let _ = match self [INFO] [stdout] 1090 | | .swarm [INFO] [stdout] 1091 | | .behaviour_mut() [INFO] [stdout] 1092 | | .gossipsub [INFO] [stdout] ... | [INFO] [stdout] 1100 | | }, [INFO] [stdout] 1101 | | }; [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 1089 - let _ = match self [INFO] [stdout] 1089 + match self [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> client/src/network.rs:1110:17 [INFO] [stdout] | [INFO] [stdout] 1110 | / let _ = match self [INFO] [stdout] 1111 | | .swarm [INFO] [stdout] 1112 | | .behaviour_mut() [INFO] [stdout] 1113 | | .gossipsub [INFO] [stdout] ... | [INFO] [stdout] 1121 | | }, [INFO] [stdout] 1122 | | }; [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 1110 - let _ = match self [INFO] [stdout] 1110 + match self [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> client/src/network.rs:1119:79 [INFO] [stdout] | [INFO] [stdout] 1119 | ... format!("Failed to send message to pubsub '{}'", e.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] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> client/src/network.rs:1139:17 [INFO] [stdout] | [INFO] [stdout] 1139 | / let _ = match self [INFO] [stdout] 1140 | | .swarm [INFO] [stdout] 1141 | | .behaviour_mut() [INFO] [stdout] 1142 | | .kademlia [INFO] [stdout] ... | [INFO] [stdout] 1150 | | }, [INFO] [stdout] 1151 | | }; [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 1139 - let _ = match self [INFO] [stdout] 1139 + match self [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> client/src/network.rs:1148:78 [INFO] [stdout] | [INFO] [stdout] 1148 | ... format!("Failed to store username in DHT '{}'", e.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] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> client/src/network.rs:1194:72 [INFO] [stdout] | [INFO] [stdout] 1194 | format!("Failed to store pubsub in DHT '{}'", e.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PublicKey` which implements the `Copy` trait [INFO] [stdout] --> client/src/network.rs:1273:29 [INFO] [stdout] | [INFO] [stdout] 1273 | ... other_public_key.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*other_public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PublicKey` which implements the `Copy` trait [INFO] [stdout] --> client/src/network.rs:1320:21 [INFO] [stdout] | [INFO] [stdout] 1320 | other_public_key.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `other_public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-binding `let` on a future [INFO] [stdout] --> client/src/network.rs:1332:17 [INFO] [stdout] | [INFO] [stdout] 1332 | / let _ = match self [INFO] [stdout] 1333 | | .swarm [INFO] [stdout] 1334 | | .behaviour_mut() [INFO] [stdout] 1335 | | .gossipsub [INFO] [stdout] ... | [INFO] [stdout] 1348 | | }; [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: consider awaiting the future or dropping explicitly with `std::mem::drop` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future [INFO] [stdout] = note: `#[warn(clippy::let_underscore_future)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> client/src/security.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 44 | / let decrypted_bytes = cipher.decrypt(nonce, ciphertext_bytes) [INFO] [stdout] 45 | | .unwrap_or_else(|_| "Could not decrypt message".as_bytes().to_vec()); [INFO] [stdout] | |_____________________________________________________________________________- unnecessary `let` binding [INFO] [stdout] 46 | [INFO] [stdout] 47 | decrypted_bytes [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 44 ~ [INFO] [stdout] 45 | [INFO] [stdout] 46 ~ cipher.decrypt(nonce, ciphertext_bytes) [INFO] [stdout] 47 + .unwrap_or_else(|_| "Could not decrypt message".as_bytes().to_vec()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> client/src/network.rs:248:16 [INFO] [stdout] | [INFO] [stdout] 248 | if let Err(_) = self.sender.send(command).await { [INFO] [stdout] | -------^^^^^^---------------------------------- help: try: `if self.sender.send(command).await.is_err()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> client/src/network.rs:254:16 [INFO] [stdout] | [INFO] [stdout] 254 | if let Err(_) = receiver.await { [INFO] [stdout] | -------^^^^^^----------------- help: try: `if receiver.await.is_err()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `chrono::DateTime` [INFO] [stdout] --> client/src/peer_info.rs:29:27 [INFO] [stdout] | [INFO] [stdout] 29 | last_updated: DateTime::::from(Local::now()).sub(TimeDelta::minutes(1)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `DateTime::::from()`: `Local::now()` [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: using `clone` on type `i16` which implements the `Copy` trait [INFO] [stdout] --> client/src/peer_info.rs:54:26 [INFO] [stdout] | [INFO] [stdout] 54 | let rating = peer_info.rating.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `peer_info.rating` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> client/src/main.rs:203:13 [INFO] [stdout] | [INFO] [stdout] 203 | / if event::poll(Duration::from_millis(100))? { [INFO] [stdout] 204 | | if let Event::Key(event) = event::read()? { [INFO] [stdout] 205 | | if event.kind == KeyEventKind::Press { [INFO] [stdout] 206 | | match event.code { [INFO] [stdout] ... | [INFO] [stdout] 255 | | } [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] 203 ~ if event::poll(Duration::from_millis(100))? [INFO] [stdout] 204 ~ && let Event::Key(event) = event::read()? { [INFO] [stdout] 205 | if event.kind == KeyEventKind::Press { [INFO] [stdout] ... [INFO] [stdout] 253 | } [INFO] [stdout] 254 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> client/src/main.rs:204:17 [INFO] [stdout] | [INFO] [stdout] 204 | / if let Event::Key(event) = event::read()? { [INFO] [stdout] 205 | | if event.kind == KeyEventKind::Press { [INFO] [stdout] 206 | | match event.code { [INFO] [stdout] ... | [INFO] [stdout] 254 | | } [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] 204 ~ if let Event::Key(event) = event::read()? [INFO] [stdout] 205 ~ && event.kind == KeyEventKind::Press { [INFO] [stdout] 206 | match event.code { [INFO] [stdout] ... [INFO] [stdout] 252 | } [INFO] [stdout] 253 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> client/src/main.rs:241:48 [INFO] [stdout] | [INFO] [stdout] 241 | ... if c == ' ' && self.input.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> client/src/main.rs:267:25 [INFO] [stdout] | [INFO] [stdout] 267 | / if !self.peer_info_hashmap.contains_key(&peer_id) { [INFO] [stdout] 268 | | self.peer_info_hashmap.insert(peer_id, PeerInfo::default()); [INFO] [stdout] 269 | | } [INFO] [stdout] | |_________________________^ help: try: `self.peer_info_hashmap.entry(peer_id).or_insert_with(|| PeerInfo::default());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> client/src/main.rs:286:25 [INFO] [stdout] | [INFO] [stdout] 286 | / if let AppState::Chatroom(topic) = self.state.clone() { [INFO] [stdout] 287 | | if topic.to_string() == topic_hash.as_str() { [INFO] [stdout] 288 | | let message = Message { [INFO] [stdout] 289 | | message_type: MessageType::UserJoin, [INFO] [stdout] ... | [INFO] [stdout] 295 | | } [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] 286 ~ if let AppState::Chatroom(topic) = self.state.clone() [INFO] [stdout] 287 ~ && topic.to_string() == topic_hash.as_str() { [INFO] [stdout] 288 | let message = Message { [INFO] [stdout] ... [INFO] [stdout] 293 | self.add_message_to_current_pubsub(message); [INFO] [stdout] 294 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> client/src/main.rs:300:25 [INFO] [stdout] | [INFO] [stdout] 300 | / if let AppState::Chatroom(topic) = self.state.clone() { [INFO] [stdout] 301 | | if topic.to_string() == topic_hash.as_str() { [INFO] [stdout] 302 | | let message = Message { [INFO] [stdout] 303 | | message_type: MessageType::UserLeave, [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] 300 ~ if let AppState::Chatroom(topic) = self.state.clone() [INFO] [stdout] 301 ~ && topic.to_string() == topic_hash.as_str() { [INFO] [stdout] 302 | let message = Message { [INFO] [stdout] ... [INFO] [stdout] 307 | self.add_message_to_current_pubsub(message); [INFO] [stdout] 308 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> client/src/main.rs:436:63 [INFO] [stdout] | [INFO] [stdout] 436 | || (other_peer_id.to_string().starts_with(&user_input) && user_input.len() >= 8) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `user_input` [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: using `clone` on type `PeerId` which implements the `Copy` trait [INFO] [stdout] --> client/src/main.rs:537:33 [INFO] [stdout] | [INFO] [stdout] 537 | .map(|(peer_id, _)| peer_id.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*peer_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PeerId` which implements the `Copy` trait [INFO] [stdout] --> client/src/main.rs:541:35 [INFO] [stdout] | [INFO] [stdout] 541 | self.request_username(peer_id.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `peer_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PeerId` which implements the `Copy` trait [INFO] [stdout] --> client/src/main.rs:542:38 [INFO] [stdout] | [INFO] [stdout] 542 | self.request_peer_rating(peer_id.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `peer_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> client/src/main.rs:553:12 [INFO] [stdout] | [INFO] [stdout] 553 | if !self.peer_info_hashmap [INFO] [stdout] | ____________^ [INFO] [stdout] 554 | | .get(&peer_id) [INFO] [stdout] 555 | | .and_then(|info| info.username.clone()) [INFO] [stdout] 556 | | .is_some() [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] 553 ~ if self.peer_info_hashmap [INFO] [stdout] 554 + .get(&peer_id) [INFO] [stdout] 555 + .and_then(|info| info.username.clone()).is_none() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> client/src/main.rs:698:18 [INFO] [stdout] | [INFO] [stdout] 698 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PublicKey` which implements the `Copy` trait [INFO] [stdout] --> client/src/network.rs:687:29 [INFO] [stdout] | [INFO] [stdout] 687 | ... other_public_key.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*other_public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> client/src/main.rs:762:73 [INFO] [stdout] | [INFO] [stdout] 762 | let mut usernames_split = self.input[DM_PREFIX.len()..].trim().split_whitespace(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> client/src/main.rs:817:27 [INFO] [stdout] | [INFO] [stdout] 817 | add_rating if add_rating == "+1" => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 817 - add_rating if add_rating == "+1" => { [INFO] [stdout] 817 + "+1" => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> client/src/main.rs:821:30 [INFO] [stdout] | [INFO] [stdout] 821 | remove_rating if remove_rating == "-1" => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 821 - remove_rating if remove_rating == "-1" => { [INFO] [stdout] 821 + "-1" => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> client/src/main.rs:878:21 [INFO] [stdout] | [INFO] [stdout] 878 | / if let AppState::Chatroom(topic) = self.state.clone() { [INFO] [stdout] 879 | | if let Some(pubsub_messages) = [INFO] [stdout] 880 | | self.pubsub_messages_hashmap.get(&topic.to_string()) [INFO] [stdout] ... | [INFO] [stdout] 888 | | } [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] 878 ~ if let AppState::Chatroom(topic) = self.state.clone() [INFO] [stdout] 879 ~ && let Some(pubsub_messages) = [INFO] [stdout] 880 | self.pubsub_messages_hashmap.get(&topic.to_string()) [INFO] [stdout] ... [INFO] [stdout] 886 | }); [INFO] [stdout] 887 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are needlessly cloning iterator elements [INFO] [stdout] --> client/src/main.rs:885:77 [INFO] [stdout] | [INFO] [stdout] 885 | ... messages.push(message.format(username_option.map(|s| s.clone()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the `map` call [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> client/src/network.rs:1434:19 [INFO] [stdout] | [INFO] [stdout] 1434 | let mut ids = vec![peer_id.to_string(), other_peer_id.to_string()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[peer_id.to_string(), other_peer_id.to_string()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PublicKey` which implements the `Copy` trait [INFO] [stdout] --> client/src/network.rs:800:29 [INFO] [stdout] | [INFO] [stdout] 800 | ... other_public_key.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*other_public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> client/src/network.rs:1079:74 [INFO] [stdout] | [INFO] [stdout] 1079 | format!("Failed to subscribe to pubsub '{}'", 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: this let-binding has unit value [INFO] [stdout] --> client/src/network.rs:1089:17 [INFO] [stdout] | [INFO] [stdout] 1089 | / let _ = match self [INFO] [stdout] 1090 | | .swarm [INFO] [stdout] 1091 | | .behaviour_mut() [INFO] [stdout] 1092 | | .gossipsub [INFO] [stdout] ... | [INFO] [stdout] 1100 | | }, [INFO] [stdout] 1101 | | }; [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 1089 - let _ = match self [INFO] [stdout] 1089 + match self [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> client/src/network.rs:1110:17 [INFO] [stdout] | [INFO] [stdout] 1110 | / let _ = match self [INFO] [stdout] 1111 | | .swarm [INFO] [stdout] 1112 | | .behaviour_mut() [INFO] [stdout] 1113 | | .gossipsub [INFO] [stdout] ... | [INFO] [stdout] 1121 | | }, [INFO] [stdout] 1122 | | }; [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 1110 - let _ = match self [INFO] [stdout] 1110 + match self [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> client/src/network.rs:1119:79 [INFO] [stdout] | [INFO] [stdout] 1119 | ... format!("Failed to send message to pubsub '{}'", e.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] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> client/src/network.rs:1139:17 [INFO] [stdout] | [INFO] [stdout] 1139 | / let _ = match self [INFO] [stdout] 1140 | | .swarm [INFO] [stdout] 1141 | | .behaviour_mut() [INFO] [stdout] 1142 | | .kademlia [INFO] [stdout] ... | [INFO] [stdout] 1150 | | }, [INFO] [stdout] 1151 | | }; [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 1139 - let _ = match self [INFO] [stdout] 1139 + match self [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> client/src/network.rs:1148:78 [INFO] [stdout] | [INFO] [stdout] 1148 | ... format!("Failed to store username in DHT '{}'", e.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] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> client/src/network.rs:1194:72 [INFO] [stdout] | [INFO] [stdout] 1194 | format!("Failed to store pubsub in DHT '{}'", e.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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PublicKey` which implements the `Copy` trait [INFO] [stdout] --> client/src/network.rs:1273:29 [INFO] [stdout] | [INFO] [stdout] 1273 | ... other_public_key.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*other_public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PublicKey` which implements the `Copy` trait [INFO] [stdout] --> client/src/network.rs:1320:21 [INFO] [stdout] | [INFO] [stdout] 1320 | other_public_key.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `other_public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-binding `let` on a future [INFO] [stdout] --> client/src/network.rs:1332:17 [INFO] [stdout] | [INFO] [stdout] 1332 | / let _ = match self [INFO] [stdout] 1333 | | .swarm [INFO] [stdout] 1334 | | .behaviour_mut() [INFO] [stdout] 1335 | | .gossipsub [INFO] [stdout] ... | [INFO] [stdout] 1348 | | }; [INFO] [stdout] | |__________________^ [INFO] [stdout] | [INFO] [stdout] = help: consider awaiting the future or dropping explicitly with `std::mem::drop` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future [INFO] [stdout] = note: `#[warn(clippy::let_underscore_future)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> client/src/security.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 44 | / let decrypted_bytes = cipher.decrypt(nonce, ciphertext_bytes) [INFO] [stdout] 45 | | .unwrap_or_else(|_| "Could not decrypt message".as_bytes().to_vec()); [INFO] [stdout] | |_____________________________________________________________________________- unnecessary `let` binding [INFO] [stdout] 46 | [INFO] [stdout] 47 | decrypted_bytes [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 44 ~ [INFO] [stdout] 45 | [INFO] [stdout] 46 ~ cipher.decrypt(nonce, ciphertext_bytes) [INFO] [stdout] 47 + .unwrap_or_else(|_| "Could not decrypt message".as_bytes().to_vec()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `chrono::DateTime` [INFO] [stdout] --> client/src/peer_info.rs:29:27 [INFO] [stdout] | [INFO] [stdout] 29 | last_updated: DateTime::::from(Local::now()).sub(TimeDelta::minutes(1)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `DateTime::::from()`: `Local::now()` [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: using `clone` on type `i16` which implements the `Copy` trait [INFO] [stdout] --> client/src/peer_info.rs:54:26 [INFO] [stdout] | [INFO] [stdout] 54 | let rating = peer_info.rating.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `peer_info.rating` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> client/src/main.rs:203:13 [INFO] [stdout] | [INFO] [stdout] 203 | / if event::poll(Duration::from_millis(100))? { [INFO] [stdout] 204 | | if let Event::Key(event) = event::read()? { [INFO] [stdout] 205 | | if event.kind == KeyEventKind::Press { [INFO] [stdout] 206 | | match event.code { [INFO] [stdout] ... | [INFO] [stdout] 255 | | } [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] 203 ~ if event::poll(Duration::from_millis(100))? [INFO] [stdout] 204 ~ && let Event::Key(event) = event::read()? { [INFO] [stdout] 205 | if event.kind == KeyEventKind::Press { [INFO] [stdout] ... [INFO] [stdout] 253 | } [INFO] [stdout] 254 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> client/src/main.rs:204:17 [INFO] [stdout] | [INFO] [stdout] 204 | / if let Event::Key(event) = event::read()? { [INFO] [stdout] 205 | | if event.kind == KeyEventKind::Press { [INFO] [stdout] 206 | | match event.code { [INFO] [stdout] ... | [INFO] [stdout] 254 | | } [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] 204 ~ if let Event::Key(event) = event::read()? [INFO] [stdout] 205 ~ && event.kind == KeyEventKind::Press { [INFO] [stdout] 206 | match event.code { [INFO] [stdout] ... [INFO] [stdout] 252 | } [INFO] [stdout] 253 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> client/src/main.rs:241:48 [INFO] [stdout] | [INFO] [stdout] 241 | ... if c == ' ' && self.input.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.input.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> client/src/main.rs:267:25 [INFO] [stdout] | [INFO] [stdout] 267 | / if !self.peer_info_hashmap.contains_key(&peer_id) { [INFO] [stdout] 268 | | self.peer_info_hashmap.insert(peer_id, PeerInfo::default()); [INFO] [stdout] 269 | | } [INFO] [stdout] | |_________________________^ help: try: `self.peer_info_hashmap.entry(peer_id).or_insert_with(|| PeerInfo::default());` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> client/src/main.rs:286:25 [INFO] [stdout] | [INFO] [stdout] 286 | / if let AppState::Chatroom(topic) = self.state.clone() { [INFO] [stdout] 287 | | if topic.to_string() == topic_hash.as_str() { [INFO] [stdout] 288 | | let message = Message { [INFO] [stdout] 289 | | message_type: MessageType::UserJoin, [INFO] [stdout] ... | [INFO] [stdout] 295 | | } [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] 286 ~ if let AppState::Chatroom(topic) = self.state.clone() [INFO] [stdout] 287 ~ && topic.to_string() == topic_hash.as_str() { [INFO] [stdout] 288 | let message = Message { [INFO] [stdout] ... [INFO] [stdout] 293 | self.add_message_to_current_pubsub(message); [INFO] [stdout] 294 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> client/src/main.rs:300:25 [INFO] [stdout] | [INFO] [stdout] 300 | / if let AppState::Chatroom(topic) = self.state.clone() { [INFO] [stdout] 301 | | if topic.to_string() == topic_hash.as_str() { [INFO] [stdout] 302 | | let message = Message { [INFO] [stdout] 303 | | message_type: MessageType::UserLeave, [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] 300 ~ if let AppState::Chatroom(topic) = self.state.clone() [INFO] [stdout] 301 ~ && topic.to_string() == topic_hash.as_str() { [INFO] [stdout] 302 | let message = Message { [INFO] [stdout] ... [INFO] [stdout] 307 | self.add_message_to_current_pubsub(message); [INFO] [stdout] 308 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> client/src/main.rs:436:63 [INFO] [stdout] | [INFO] [stdout] 436 | || (other_peer_id.to_string().starts_with(&user_input) && user_input.len() >= 8) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `user_input` [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: using `clone` on type `PeerId` which implements the `Copy` trait [INFO] [stdout] --> client/src/main.rs:537:33 [INFO] [stdout] | [INFO] [stdout] 537 | .map(|(peer_id, _)| peer_id.clone()) [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*peer_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PeerId` which implements the `Copy` trait [INFO] [stdout] --> client/src/main.rs:541:35 [INFO] [stdout] | [INFO] [stdout] 541 | self.request_username(peer_id.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `peer_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PeerId` which implements the `Copy` trait [INFO] [stdout] --> client/src/main.rs:542:38 [INFO] [stdout] | [INFO] [stdout] 542 | self.request_peer_rating(peer_id.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try removing the `clone` call: `peer_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> client/src/main.rs:553:12 [INFO] [stdout] | [INFO] [stdout] 553 | if !self.peer_info_hashmap [INFO] [stdout] | ____________^ [INFO] [stdout] 554 | | .get(&peer_id) [INFO] [stdout] 555 | | .and_then(|info| info.username.clone()) [INFO] [stdout] 556 | | .is_some() [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] 553 ~ if self.peer_info_hashmap [INFO] [stdout] 554 + .get(&peer_id) [INFO] [stdout] 555 + .and_then(|info| info.username.clone()).is_none() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert_with` to construct default value [INFO] [stdout] --> client/src/main.rs:698:18 [INFO] [stdout] | [INFO] [stdout] 698 | .or_insert_with(Vec::new) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: found call to `str::trim` before `str::split_whitespace` [INFO] [stdout] --> client/src/main.rs:762:73 [INFO] [stdout] | [INFO] [stdout] 762 | let mut usernames_split = self.input[DM_PREFIX.len()..].trim().split_whitespace(); [INFO] [stdout] | ^^^^^^^ help: remove `trim()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trim_split_whitespace [INFO] [stdout] = note: `#[warn(clippy::trim_split_whitespace)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> client/src/main.rs:817:27 [INFO] [stdout] | [INFO] [stdout] 817 | add_rating if add_rating == "+1" => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] = note: `#[warn(clippy::redundant_guards)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 817 - add_rating if add_rating == "+1" => { [INFO] [stdout] 817 + "+1" => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant guard [INFO] [stdout] --> client/src/main.rs:821:30 [INFO] [stdout] | [INFO] [stdout] 821 | remove_rating if remove_rating == "-1" => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 821 - remove_rating if remove_rating == "-1" => { [INFO] [stdout] 821 + "-1" => { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> client/src/main.rs:878:21 [INFO] [stdout] | [INFO] [stdout] 878 | / if let AppState::Chatroom(topic) = self.state.clone() { [INFO] [stdout] 879 | | if let Some(pubsub_messages) = [INFO] [stdout] 880 | | self.pubsub_messages_hashmap.get(&topic.to_string()) [INFO] [stdout] ... | [INFO] [stdout] 888 | | } [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] 878 ~ if let AppState::Chatroom(topic) = self.state.clone() [INFO] [stdout] 879 ~ && let Some(pubsub_messages) = [INFO] [stdout] 880 | self.pubsub_messages_hashmap.get(&topic.to_string()) [INFO] [stdout] ... [INFO] [stdout] 886 | }); [INFO] [stdout] 887 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are needlessly cloning iterator elements [INFO] [stdout] --> client/src/main.rs:885:77 [INFO] [stdout] | [INFO] [stdout] 885 | ... messages.push(message.format(username_option.map(|s| s.clone()))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the `map` call [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> client/src/network.rs:1434:19 [INFO] [stdout] | [INFO] [stdout] 1434 | let mut ids = vec![peer_id.to_string(), other_peer_id.to_string()]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[peer_id.to_string(), other_peer_id.to_string()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 44.09s [INFO] running `Command { std: "docker" "inspect" "b969df2b9a1385c8731603a395663f4dc520b9566389cfc7813fae6a30a547e4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b969df2b9a1385c8731603a395663f4dc520b9566389cfc7813fae6a30a547e4", kill_on_drop: false }` [INFO] [stdout] b969df2b9a1385c8731603a395663f4dc520b9566389cfc7813fae6a30a547e4