[INFO] cloning repository https://github.com/carlosb1/p2p-poc [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/carlosb1/p2p-poc" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcarlosb1%2Fp2p-poc", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcarlosb1%2Fp2p-poc'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9632b26e72c0efc550dd92398fd0b4c9ca189352 [INFO] linting carlosb1/p2p-poc against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcarlosb1%2Fp2p-poc" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/carlosb1/p2p-poc [INFO] finished tweaking git repo https://github.com/carlosb1/p2p-poc [INFO] tweaked toml for git repo https://github.com/carlosb1/p2p-poc written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/carlosb1/p2p-poc 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/carlosb1/p2p-poc 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: /workspace/builds/worker-5-tc1/source/messages-p2p/Cargo.toml: unused manifest key: test-dependencies [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded sha1_smol v1.0.1 [INFO] [stderr] Downloaded data-encoding-macro v0.1.18 [INFO] [stderr] Downloaded unsigned-varint v0.8.0 [INFO] [stderr] Downloaded oid-registry v0.7.1 [INFO] [stderr] Downloaded prometheus-client-derive-encode v0.4.2 [INFO] [stderr] Downloaded data-encoding-macro-internal v0.1.16 [INFO] [stderr] Downloaded unsigned-varint v0.7.2 [INFO] [stderr] Downloaded ghash v0.5.1 [INFO] [stderr] Downloaded asn1-rs-impl v0.2.0 [INFO] [stderr] Downloaded pem v3.0.5 [INFO] [stderr] Downloaded poly1305 v0.8.0 [INFO] [stderr] Downloaded libp2p-identify v0.46.0 [INFO] [stderr] Downloaded once_cell_polyfill v1.70.0 [INFO] [stderr] Downloaded pyo3-macros v0.25.1 [INFO] [stderr] Downloaded is-terminal v0.4.16 [INFO] [stderr] Downloaded netlink-packet-route v0.17.1 [INFO] [stderr] Downloaded humantime v2.2.0 [INFO] [stderr] Downloaded pyo3-build-config v0.25.1 [INFO] [stderr] Downloaded env_logger v0.10.2 [INFO] [stderr] Downloaded winnow v0.7.10 [INFO] [stderr] Downloaded pyo3-ffi v0.25.1 [INFO] [stderr] Downloaded meilisearch-sdk v0.29.1 [INFO] [stderr] Downloaded libp2p-gossipsub v0.48.0 [INFO] [stderr] Downloaded quinn-proto v0.11.12 [INFO] [stderr] Downloaded webpki-roots v1.0.0 [INFO] [stderr] Downloaded pyo3-macros-backend v0.25.1 [INFO] [stderr] Downloaded jiff-static v0.2.14 [INFO] [stderr] Downloaded loom v0.7.2 [INFO] [stderr] Downloaded serde_with v3.14.0 [INFO] [stderr] Downloaded moka v0.12.10 [INFO] [stderr] Downloaded mongodb v3.2.5 [INFO] [stderr] Downloaded redis v0.32.5 [INFO] [stderr] Downloaded jsonwebtoken v9.3.1 [INFO] [stderr] Downloaded generator v0.8.5 [INFO] [stderr] Downloaded iso8601 v0.6.3 [INFO] [stderr] Downloaded sled v0.34.7 [INFO] [stderr] Downloaded env_filter v0.1.3 [INFO] [stderr] Downloaded libp2p-allow-block-list v0.5.0 [INFO] [stderr] Downloaded hickory-proto v0.25.0-alpha.5 [INFO] [stderr] Downloaded libp2p-connection-limits v0.5.0 [INFO] [stderr] Downloaded hickory-resolver v0.25.0-alpha.5 [INFO] [stderr] Downloaded snow v0.9.6 [INFO] [stderr] Downloaded libp2p-dns v0.43.0 [INFO] [stderr] Downloaded hashlink v0.9.1 [INFO] [stderr] Downloaded uint v0.10.0 [INFO] [stderr] Downloaded aes-gcm v0.10.3 [INFO] [stderr] Downloaded toml_edit v0.22.26 [INFO] [stderr] Downloaded bson v2.15.0 [INFO] [stderr] Downloaded unicode-normalization v0.1.24 [INFO] [stderr] Downloaded indoc v2.0.6 [INFO] [stderr] Downloaded target-lexicon v0.13.2 [INFO] [stderr] Downloaded meilisearch-index-setting-macro v0.29.1 [INFO] [stderr] Downloaded yaup v0.3.1 [INFO] [stderr] Downloaded dotenv v0.15.0 [INFO] [stderr] Downloaded jiff v0.2.14 [INFO] [stderr] Downloaded anstyle-wincon v3.0.8 [INFO] [stderr] Downloaded libp2p-kad v0.47.0 [INFO] [stderr] Downloaded libp2p-swarm v0.46.0 [INFO] [stderr] Downloaded quick-protobuf v0.8.1 [INFO] [stderr] Downloaded libp2p v0.55.0 [INFO] [stderr] Downloaded schemars v1.0.4 [INFO] [stderr] Downloaded unindent v0.2.4 [INFO] [stderr] Downloaded structmeta-derive v0.3.0 [INFO] [stderr] Downloaded x25519-dalek v2.0.1 [INFO] [stderr] Downloaded asn1-rs v0.6.2 [INFO] [stderr] Downloaded x509-parser v0.16.0 [INFO] [stderr] Downloaded ed25519-dalek v2.1.1 [INFO] [stderr] Downloaded hyper-util v0.1.12 [INFO] [stderr] Downloaded quinn v0.11.8 [INFO] [stderr] Downloaded structmeta v0.3.0 [INFO] [stderr] Downloaded tagptr v0.2.0 [INFO] [stderr] Downloaded libp2p-mdns v0.47.0 [INFO] [stderr] Downloaded chacha20poly1305 v0.10.1 [INFO] [stderr] Downloaded rcgen v0.13.2 [INFO] [stderr] Downloaded libp2p-quic v0.12.0 [INFO] [stderr] Downloaded libp2p-relay v0.19.0 [INFO] [stderr] Downloaded libp2p-request-response v0.28.0 [INFO] [stderr] Downloaded rtnetlink v0.13.1 [INFO] [stderr] Downloaded pyo3 v0.25.1 [INFO] [stderr] Downloaded attohttpc v0.24.1 [INFO] [stderr] Downloaded toml v0.8.22 [INFO] [stderr] Downloaded derive-where v1.6.0 [INFO] [stderr] Downloaded schemars v0.9.0 [INFO] [stderr] Downloaded serde_with_macros v3.14.0 [INFO] [stderr] Downloaded hex_fmt v0.3.0 [INFO] [stderr] Downloaded prometheus-client v0.22.3 [INFO] [stderr] Downloaded blake2 v0.10.6 [INFO] [stderr] Downloaded der-parser v9.0.0 [INFO] [stderr] Downloaded yasna v0.5.2 [INFO] [stderr] Downloaded windows-core v0.53.0 [INFO] [stderr] Downloaded xml-rs v0.8.26 [INFO] [stderr] Downloaded libp2p-upnp v0.4.0 [INFO] [stderr] Downloaded libp2p-core v0.43.0 [INFO] [stderr] Downloaded libp2p-identity v0.2.11 [INFO] [stderr] Downloaded dtoa v1.0.10 [INFO] [stderr] Downloaded libp2p-metrics v0.16.0 [INFO] [stderr] Downloaded chacha20 v0.9.1 [INFO] [stderr] Downloaded libp2p-tls v0.6.1 [INFO] [stderr] Downloaded netlink-proto v0.11.5 [INFO] [stderr] Downloaded igd-next v0.15.1 [INFO] [stderr] Downloaded multiaddr v0.18.2 [INFO] [stderr] Downloaded derive-syn-parse v0.2.0 [INFO] [stderr] Downloaded libp2p-noise v0.46.0 [INFO] [stderr] Downloaded futures-rustls v0.26.0 [INFO] [stderr] Downloaded asynchronous-codec v0.7.0 [INFO] [stderr] Downloaded netlink-packet-core v0.7.0 [INFO] [stderr] Downloaded if-watch v3.2.1 [INFO] [stderr] Downloaded libp2p-tcp v0.43.0 [INFO] [stderr] Downloaded multistream-select v0.13.0 [INFO] [stderr] Downloaded base64ct v1.7.3 [INFO] [stderr] Downloaded fs2 v0.4.3 [INFO] [stderr] Downloaded macro_magic_core v0.5.1 [INFO] [stderr] Downloaded futures-bounded v0.2.4 [INFO] [stderr] Downloaded if-addrs v0.10.2 [INFO] [stderr] Downloaded netlink-sys v0.8.7 [INFO] [stderr] Downloaded libp2p-swarm-derive v0.35.0 [INFO] [stderr] Downloaded yamux v0.13.5 [INFO] [stderr] Downloaded toml_write v0.1.1 [INFO] [stderr] Downloaded netlink-packet-utils v0.5.2 [INFO] [stderr] Downloaded yamux v0.12.1 [INFO] [stderr] Downloaded libp2p-yamux v0.47.0 [INFO] [stderr] Downloaded multihash v0.19.3 [INFO] [stderr] Downloaded toml_datetime v0.6.9 [INFO] [stderr] Downloaded macro_magic_core_macros v0.5.1 [INFO] [stderr] Downloaded ref-cast-impl v1.0.24 [INFO] [stderr] Downloaded quick-protobuf-codec v0.3.1 [INFO] [stderr] Downloaded macro_magic v0.5.1 [INFO] [stderr] Downloaded rustc_version_runtime v0.3.0 [INFO] [stderr] Downloaded ref-cast v1.0.24 [INFO] [stderr] Downloaded multibase v0.9.1 [INFO] [stderr] Downloaded rw-stream-sink v0.4.0 [INFO] [stderr] Downloaded macro_magic_macros v0.5.1 [INFO] [stderr] Downloaded typed-builder v0.10.0 [INFO] [stderr] Downloaded quinn-udp v0.5.12 [INFO] [stderr] Downloaded asn1-rs-derive v0.5.1 [INFO] [stderr] Downloaded base-x v0.2.11 [INFO] [stderr] Downloaded mongodb-internal-macros v3.2.5 [INFO] [stderr] Downloaded take_mut v0.2.2 [INFO] [stderr] Downloaded windows v0.61.1 [INFO] [stderr] Downloaded windows v0.53.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 180ae86611a40999cb727b99d2b779359eedff3cb5394724391cca5cabd1092c [INFO] running `Command { std: "docker" "start" "-a" "180ae86611a40999cb727b99d2b779359eedff3cb5394724391cca5cabd1092c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "180ae86611a40999cb727b99d2b779359eedff3cb5394724391cca5cabd1092c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "180ae86611a40999cb727b99d2b779359eedff3cb5394724391cca5cabd1092c", kill_on_drop: false }` [INFO] [stdout] 180ae86611a40999cb727b99d2b779359eedff3cb5394724391cca5cabd1092c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] b9b6bb8416165fac6e3c211616aa936d929faea3f6cbd0fd87c92bbe0ada44bc [INFO] running `Command { std: "docker" "start" "-a" "b9b6bb8416165fac6e3c211616aa936d929faea3f6cbd0fd87c92bbe0ada44bc", kill_on_drop: false }` [INFO] [stderr] warning: /opt/rustwide/workdir/messages-p2p/Cargo.toml: unused manifest key: test-dependencies [INFO] [stderr] Compiling libc v0.2.172 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Compiling autocfg v1.4.0 [INFO] [stderr] Checking memchr v2.7.4 [INFO] [stderr] Checking smallvec v1.15.0 [INFO] [stderr] Checking log v0.4.27 [INFO] [stderr] Checking bytes v1.10.1 [INFO] [stderr] Compiling parking_lot_core v0.9.10 [INFO] [stderr] Compiling serde v1.0.219 [INFO] [stderr] Compiling zerocopy v0.8.25 [INFO] [stderr] Checking subtle v2.6.1 [INFO] [stderr] Checking stable_deref_trait v1.2.0 [INFO] [stderr] Compiling typenum v1.18.0 [INFO] [stderr] Checking tracing-core v0.1.33 [INFO] [stderr] Compiling semver v1.0.26 [INFO] [stderr] Compiling syn v2.0.104 [INFO] [stderr] Checking percent-encoding v2.3.1 [INFO] [stderr] Checking litemap v0.8.0 [INFO] [stderr] Checking writeable v0.6.1 [INFO] [stderr] Compiling cc v1.2.23 [INFO] [stderr] Compiling icu_properties_data v2.0.1 [INFO] [stderr] Compiling icu_normalizer_data v2.0.0 [INFO] [stderr] Checking form_urlencoded v1.2.1 [INFO] [stderr] Compiling thiserror v2.0.12 [INFO] [stderr] Checking allocator-api2 v0.2.21 [INFO] [stderr] Checking data-encoding v2.9.0 [INFO] [stderr] Checking utf8_iter v1.0.4 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Checking unsigned-varint v0.8.0 [INFO] [stderr] Checking signature v2.2.0 [INFO] [stderr] Checking core2 v0.4.0 [INFO] [stderr] Compiling lock_api v0.4.12 [INFO] [stderr] Compiling slab v0.4.9 [INFO] [stderr] Compiling rustc_version v0.4.1 [INFO] [stderr] Checking quick-protobuf v0.8.1 [INFO] [stderr] Checking hashbrown v0.15.3 [INFO] [stderr] Checking base-x v0.2.11 [INFO] [stderr] Checking ed25519 v2.2.3 [INFO] [stderr] Checking bs58 v0.5.1 [INFO] [stderr] Checking ipnet v2.11.0 [INFO] [stderr] Checking multihash v0.19.3 [INFO] [stderr] Checking web-time v1.1.0 [INFO] [stderr] Checking unsigned-varint v0.7.2 [INFO] [stderr] Checking futures-timer v3.0.3 [INFO] [stderr] Checking untrusted v0.9.0 [INFO] [stderr] Checking base64 v0.22.1 [INFO] [stderr] Compiling anyhow v1.0.98 [INFO] [stderr] Checking tinyvec v1.9.0 [INFO] [stderr] Checking http v1.3.1 [INFO] [stderr] Compiling curve25519-dalek v4.1.3 [INFO] [stderr] Compiling serde_json v1.0.140 [INFO] [stderr] Checking bitflags v2.9.1 [INFO] [stderr] Compiling ahash v0.8.12 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking indexmap v2.9.0 [INFO] [stderr] Checking generic-array v0.14.7 [INFO] [stderr] Checking lru v0.12.5 [INFO] [stderr] Compiling once_cell v1.21.3 [INFO] [stderr] Compiling vcpkg v0.2.15 [INFO] [stderr] Checking regex-syntax v0.8.5 [INFO] [stderr] Compiling portable-atomic v1.11.0 [INFO] [stderr] Checking crossbeam-epoch v0.9.18 [INFO] [stderr] Checking concurrent-queue v2.5.0 [INFO] [stderr] Checking tower-service v0.3.3 [INFO] [stderr] Compiling moka v0.12.10 [INFO] [stderr] Checking resolv-conf v0.7.4 [INFO] [stderr] Checking hex v0.4.3 [INFO] [stderr] Compiling crunchy v0.2.3 [INFO] [stderr] Checking event-listener v5.4.0 [INFO] [stderr] Compiling snow v0.9.6 [INFO] [stderr] Checking nohash-hasher v0.2.0 [INFO] [stderr] Checking tagptr v0.2.0 [INFO] [stderr] Compiling prometheus-client v0.22.3 [INFO] [stderr] Compiling parking_lot_core v0.8.6 [INFO] [stderr] Checking try-lock v0.2.5 [INFO] [stderr] Checking instant v0.1.13 [INFO] [stderr] Checking want v0.3.1 [INFO] [stderr] Checking httpdate v1.0.3 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking mio v1.0.3 [INFO] [stderr] Checking signal-hook-registry v1.4.5 [INFO] [stderr] Checking socket2 v0.5.9 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking nix v0.26.4 [INFO] [stderr] Checking event-listener-strategy v0.5.4 [INFO] [stderr] Compiling openssl v0.10.73 [INFO] [stderr] Checking dtoa v1.0.10 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking foreign-types-shared v0.1.1 [INFO] [stderr] Compiling rustix v1.0.7 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Compiling openssl-sys v0.9.109 [INFO] [stderr] Checking foreign-types v0.3.2 [INFO] [stderr] Checking async-channel v2.3.1 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Checking uint v0.10.0 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking anstyle-parse v0.2.6 [INFO] [stderr] Checking sync_wrapper v1.0.2 [INFO] [stderr] Checking linux-raw-sys v0.9.4 [INFO] [stderr] Checking colorchoice v1.0.3 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking tower-layer v0.3.3 [INFO] [stderr] Checking anstyle v1.0.10 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Compiling rustls v0.23.27 [INFO] [stderr] Checking iana-time-zone v0.1.63 [INFO] [stderr] Checking hex_fmt v0.3.0 [INFO] [stderr] Checking anstyle-query v1.1.2 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking parking_lot v0.11.2 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking http-body-util v0.1.3 [INFO] [stderr] Checking fs2 v0.4.3 [INFO] [stderr] Checking crc32fast v1.4.2 [INFO] [stderr] Checking jiff v0.2.14 [INFO] [stderr] Compiling target-lexicon v0.13.2 [INFO] [stderr] Checking openssl-probe v0.1.6 [INFO] [stderr] Checking hkdf v0.12.4 [INFO] [stderr] Checking anstream v0.6.18 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking sled v0.34.7 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking hashbrown v0.14.5 [INFO] [stderr] Checking mime v0.3.17 [INFO] [stderr] Compiling rustversion v1.0.20 [INFO] [stderr] Checking messages-types v0.1.0 (/opt/rustwide/workdir/messages-types) [INFO] [stderr] Checking utf-8 v0.7.6 [INFO] [stderr] Checking iri-string v0.7.8 [INFO] [stderr] Checking rand v0.9.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking nom v8.0.0 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Checking winnow v0.7.10 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling pyo3-build-config v0.25.1 [INFO] [stderr] Checking toml_write v0.1.1 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking matchit v0.8.4 [INFO] [stderr] Checking dotenv v0.15.0 [INFO] [stderr] Checking hashlink v0.9.1 [INFO] [stderr] Compiling tiny-keccak v2.0.2 [INFO] [stderr] Compiling fnv v1.0.7 [INFO] [stderr] Compiling ident_case v1.0.1 [INFO] [stderr] Compiling strsim v0.11.1 [INFO] [stderr] Compiling num-conv v0.1.0 [INFO] [stderr] Checking powerfmt v0.2.0 [INFO] [stderr] Compiling darling_core v0.20.11 [INFO] [stderr] Compiling time-core v0.1.4 [INFO] [stderr] Compiling radium v0.7.0 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking env_filter v0.1.3 [INFO] [stderr] Compiling time-macros v0.2.22 [INFO] [stderr] Checking tap v1.0.1 [INFO] [stderr] Compiling rustls v0.21.12 [INFO] [stderr] Checking wyz v0.5.1 [INFO] [stderr] Compiling rustc_version_runtime v0.3.0 [INFO] [stderr] Compiling memoffset v0.9.1 [INFO] [stderr] Checking funty v2.0.0 [INFO] [stderr] Checking linked-hash-map v0.5.6 [INFO] [stderr] Checking lru-cache v0.1.2 [INFO] [stderr] Compiling convert_case v0.8.0 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Compiling const-random-macro v0.1.16 [INFO] [stderr] Checking unicode-normalization v0.1.24 [INFO] [stderr] Compiling convert_case v0.4.0 [INFO] [stderr] Checking unicode-bidi v0.3.18 [INFO] [stderr] Checking tempfile v3.20.0 [INFO] [stderr] Compiling const-random v0.1.18 [INFO] [stderr] Checking unicode-properties v0.1.3 [INFO] [stderr] Checking base64 v0.21.7 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking md-5 v0.10.6 [INFO] [stderr] Compiling pyo3-macros-backend v0.25.1 [INFO] [stderr] Compiling pyo3-ffi v0.25.1 [INFO] [stderr] Compiling pyo3 v0.25.1 [INFO] [stderr] Checking rustls-pemfile v1.0.4 [INFO] [stderr] Checking pbkdf2 v0.11.0 [INFO] [stderr] Checking is-terminal v0.4.16 [INFO] [stderr] Checking bitvec v1.0.1 [INFO] [stderr] Checking socket2 v0.6.0 [INFO] [stderr] Checking unindent v0.2.4 [INFO] [stderr] Checking take_mut v0.2.2 [INFO] [stderr] Checking base64 v0.13.1 [INFO] [stderr] Checking sha1_smol v1.0.1 [INFO] [stderr] Checking webpki-roots v0.25.4 [INFO] [stderr] Checking stringprep v0.1.5 [INFO] [stderr] Compiling indoc v2.0.6 [INFO] [stderr] Checking iso8601 v0.6.3 [INFO] [stderr] Checking humantime v2.2.0 [INFO] [stderr] Checking env_logger v0.10.2 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tracing-attributes v0.1.28 [INFO] [stderr] Compiling zeroize_derive v1.4.2 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Checking tokio v1.45.0 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling curve25519-dalek-derive v0.1.1 [INFO] [stderr] Checking zeroize v1.8.1 [INFO] [stderr] Compiling pin-project-internal v1.1.10 [INFO] [stderr] Compiling data-encoding-macro-internal v0.1.16 [INFO] [stderr] Compiling async-trait v0.1.88 [INFO] [stderr] Compiling libp2p-swarm-derive v0.35.0 [INFO] [stderr] Compiling enum-as-inner v0.6.1 [INFO] [stderr] Checking data-encoding-macro v0.1.18 [INFO] [stderr] Checking multibase v0.9.1 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Compiling async-recursion v1.1.1 [INFO] [stderr] Checking rustls-pki-types v1.12.0 [INFO] [stderr] Compiling prometheus-client-derive-encode v0.4.2 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking netlink-packet-utils v0.5.2 [INFO] [stderr] Checking zerovec v0.11.2 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Checking rustls-webpki v0.103.3 [INFO] [stderr] Checking env_logger v0.11.8 [INFO] [stderr] Checking netlink-packet-core v0.7.0 [INFO] [stderr] Checking webpki-roots v1.0.0 [INFO] [stderr] Checking tungstenite v0.26.2 [INFO] [stderr] Checking axum-core v0.5.2 [INFO] [stderr] Checking netlink-packet-route v0.17.1 [INFO] [stderr] Compiling macro_magic_core_macros v0.5.1 [INFO] [stderr] Compiling derive-syn-parse v0.2.0 [INFO] [stderr] Compiling darling_macro v0.20.11 [INFO] [stderr] Checking pin-project v1.1.10 [INFO] [stderr] Checking sct v0.7.1 [INFO] [stderr] Checking rustls-webpki v0.101.7 [INFO] [stderr] Checking ed25519-dalek v2.1.1 [INFO] [stderr] Checking x25519-dalek v2.0.1 [INFO] [stderr] Compiling structmeta-derive v0.3.0 [INFO] [stderr] Compiling darling v0.20.11 [INFO] [stderr] Compiling derive-where v1.6.0 [INFO] [stderr] Compiling serde_with_macros v3.14.0 [INFO] [stderr] Checking libp2p-identity v0.2.11 [INFO] [stderr] Compiling derive_more v0.99.20 [INFO] [stderr] Compiling macro_magic_core v0.5.1 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.2 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking asynchronous-codec v0.7.0 [INFO] [stderr] Checking rw-stream-sink v0.4.0 [INFO] [stderr] Checking multistream-select v0.13.0 [INFO] [stderr] Checking quick-protobuf-codec v0.3.1 [INFO] [stderr] Checking futures-bounded v0.2.4 [INFO] [stderr] Checking yamux v0.13.5 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking yamux v0.12.1 [INFO] [stderr] Compiling macro_magic_macros v0.5.1 [INFO] [stderr] Compiling structmeta v0.3.0 [INFO] [stderr] Compiling meilisearch-index-setting-macro v0.29.1 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Compiling macro_magic v0.5.1 [INFO] [stderr] Compiling mongodb-internal-macros v3.2.5 [INFO] [stderr] Compiling pyo3-macros v0.25.1 [INFO] [stderr] Compiling typed-builder v0.10.0 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Checking uuid v1.17.0 [INFO] [stderr] Checking chrono v0.4.41 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking toml_datetime v0.6.9 [INFO] [stderr] Checking serde_spanned v0.6.8 [INFO] [stderr] Checking serde_path_to_error v0.1.17 [INFO] [stderr] Checking deranged v0.4.0 [INFO] [stderr] Checking serde_bytes v0.11.17 [INFO] [stderr] Checking yaup v0.3.1 [INFO] [stderr] Checking serde_with v3.14.0 [INFO] [stderr] Checking toml_edit v0.22.26 [INFO] [stderr] Checking tokio-util v0.7.15 [INFO] [stderr] Checking netlink-sys v0.8.7 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking tokio-rustls v0.26.2 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking tokio-tungstenite v0.26.2 [INFO] [stderr] Checking tokio-rustls v0.24.1 [INFO] [stderr] Checking netlink-proto v0.11.5 [INFO] [stderr] Checking multiaddr v0.18.2 [INFO] [stderr] Checking hickory-proto v0.25.0-alpha.5 [INFO] [stderr] Checking hickory-proto v0.24.4 [INFO] [stderr] Checking rtnetlink v0.13.1 [INFO] [stderr] Checking tower-http v0.6.6 [INFO] [stderr] Checking if-watch v3.2.1 [INFO] [stderr] Checking libp2p-core v0.43.0 [INFO] [stderr] Checking h2 v0.4.10 [INFO] [stderr] Checking combine v4.6.7 [INFO] [stderr] Checking jsonwebtoken v9.3.1 [INFO] [stderr] Checking time v0.3.41 [INFO] [stderr] Checking libp2p-swarm v0.46.0 [INFO] [stderr] Checking libp2p-tcp v0.43.0 [INFO] [stderr] Checking libp2p-noise v0.46.0 [INFO] [stderr] Checking libp2p-yamux v0.47.0 [INFO] [stderr] Checking toml v0.8.22 [INFO] [stderr] Checking bson v2.15.0 [INFO] [stderr] Checking hickory-resolver v0.25.0-alpha.5 [INFO] [stderr] Checking libp2p-relay v0.19.0 [INFO] [stderr] Checking libp2p-identify v0.46.0 [INFO] [stderr] Checking libp2p-allow-block-list v0.5.0 [INFO] [stderr] Checking libp2p-request-response v0.28.0 [INFO] [stderr] Checking libp2p-kad v0.47.0 [INFO] [stderr] Checking libp2p-mdns v0.47.0 [INFO] [stderr] Checking libp2p-gossipsub v0.48.0 [INFO] [stderr] Checking libp2p-connection-limits v0.5.0 [INFO] [stderr] Checking hickory-resolver v0.24.4 [INFO] [stderr] Checking libp2p-dns v0.43.0 [INFO] [stderr] Checking hyper v1.6.0 [INFO] [stderr] Checking mongodb v3.2.5 [INFO] [stderr] Checking redis v0.32.5 [INFO] [stderr] Checking hyper-util v0.1.12 [INFO] [stderr] Checking libp2p v0.55.0 [INFO] [stderr] Checking protocol-p2p v0.1.0 (/opt/rustwide/workdir/protocol-p2p) [INFO] [stdout] warning: unused imports: `Deserialize` and `Serialize` [INFO] [stdout] --> protocol-p2p/src/client.rs:7:13 [INFO] [stdout] | [INFO] [stdout] 7 | use serde::{Deserialize, Serialize}; [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: `VoteStatus` [INFO] [stdout] --> protocol-p2p/src/client.rs:16:38 [INFO] [stdout] | [INFO] [stdout] 16 | use crate::models::db::{DataContent, VoteStatus}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `models` [INFO] [stdout] --> protocol-p2p/src/client.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | db, models, DEFAULT_REPUTATION, MEMBERS_FOR_CONSENSUS, MIN_REPUTATION_THRESHOLD, TIMEOUT_SECS, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> protocol-p2p/src/client.rs:127:12 [INFO] [stdout] | [INFO] [stdout] 127 | if (votation.leader_id == self.peer_id.to_string()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 127 - if (votation.leader_id == self.peer_id.to_string()) { [INFO] [stdout] 127 + if votation.leader_id == self.peer_id.to_string() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Deserialize` and `Serialize` [INFO] [stdout] --> protocol-p2p/src/models.rs:1:13 [INFO] [stdout] | [INFO] [stdout] 1 | use serde::{Deserialize, Serialize}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `VoteStatus` [INFO] [stdout] --> protocol-p2p/src/db.rs:1:69 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::models::db::{DataContent, StateContent, Topic, Votation, VoteStatus}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `chrono::Utc` [INFO] [stdout] --> protocol-p2p/src/db.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use chrono::Utc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Arc` [INFO] [stdout] --> protocol-p2p/src/db.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use std::sync::Arc; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Deserialize` and `Serialize` [INFO] [stdout] --> protocol-p2p/src/client.rs:7:13 [INFO] [stdout] | [INFO] [stdout] 7 | use serde::{Deserialize, Serialize}; [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: `VoteStatus` [INFO] [stdout] --> protocol-p2p/src/client.rs:16:38 [INFO] [stdout] | [INFO] [stdout] 16 | use crate::models::db::{DataContent, VoteStatus}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `models` [INFO] [stdout] --> protocol-p2p/src/client.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | db, models, DEFAULT_REPUTATION, MEMBERS_FOR_CONSENSUS, MIN_REPUTATION_THRESHOLD, TIMEOUT_SECS, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> protocol-p2p/src/client.rs:127:12 [INFO] [stdout] | [INFO] [stdout] 127 | if (votation.leader_id == self.peer_id.to_string()) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 127 - if (votation.leader_id == self.peer_id.to_string()) { [INFO] [stdout] 127 + if votation.leader_id == self.peer_id.to_string() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Deserialize` and `Serialize` [INFO] [stdout] --> protocol-p2p/src/models.rs:1:13 [INFO] [stdout] | [INFO] [stdout] 1 | use serde::{Deserialize, Serialize}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `StateContent` and `VoteStatus` [INFO] [stdout] --> protocol-p2p/src/db.rs:1:38 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::models::db::{DataContent, StateContent, Topic, Votation, VoteStatus}; [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `db` [INFO] [stdout] --> protocol-p2p/src/db.rs:3:13 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::{db, models}; [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `chrono::Utc` [INFO] [stdout] --> protocol-p2p/src/db.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use chrono::Utc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Arc` [INFO] [stdout] --> protocol-p2p/src/db.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use std::sync::Arc; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> protocol-p2p/src/handler.rs:116:30 [INFO] [stdout] | [INFO] [stdout] 116 | let Some(mut votation) = db::get_status_vote(&db, &id_votation) else { [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `find_key` [INFO] [stdout] --> protocol-p2p/src/db.rs:248:24 [INFO] [stdout] | [INFO] [stdout] 248 | if let Ok((find_key, value)) = item { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_find_key` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> protocol-p2p/src/db.rs:441:9 [INFO] [stdout] | [INFO] [stdout] 441 | let mut result = get_status_vote(&db, &vote.id_votation).unwrap(); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PeerId` which implements the `Copy` trait [INFO] [stdout] --> protocol-p2p/src/client.rs:38:17 [INFO] [stdout] | [INFO] [stdout] 38 | 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] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PeerId` which implements the `Copy` trait [INFO] [stdout] --> protocol-p2p/src/client.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | self.peer_id.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/client.rs:156:34 [INFO] [stdout] | [INFO] [stdout] 156 | db::get_voters(&self.db, &key, &topic) [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] = 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] --> protocol-p2p/src/client.rs:156:40 [INFO] [stdout] | [INFO] [stdout] 156 | db::get_voters(&self.db, &key, &topic) [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/client.rs:228:72 [INFO] [stdout] | [INFO] [stdout] 228 | for possible_voter_peer_id in db::get_voters(&self.db, &key, &topic)? { [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/client.rs:228:78 [INFO] [stdout] | [INFO] [stdout] 228 | for possible_voter_peer_id in db::get_voters(&self.db, &key, &topic)? { [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/client.rs:230:54 [INFO] [stdout] | [INFO] [stdout] 230 | db::get_reputation(&self.db, &possible_voter_peer_id.as_str(), &topic) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `possible_voter_peer_id.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/client.rs:230:88 [INFO] [stdout] | [INFO] [stdout] 230 | db::get_reputation(&self.db, &possible_voter_peer_id.as_str(), &topic) [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/client.rs:235:37 [INFO] [stdout] | [INFO] [stdout] 235 | ... &topic, [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/client.rs:236:37 [INFO] [stdout] | [INFO] [stdout] 236 | ... &possible_voter_peer_id.as_str(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `possible_voter_peer_id.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:52:56 [INFO] [stdout] | [INFO] [stdout] 52 | db::my_pending_content_to_validate(&db, &data_content).ok()?; [INFO] [stdout] | ^^^ help: change this to: `db` [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: `to_string` applied to a type that implements `Display` in `debug!` args [INFO] [stdout] --> protocol-p2p/src/handler.rs:60:36 [INFO] [stdout] | [INFO] [stdout] 60 | source_peer.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:62:37 [INFO] [stdout] | [INFO] [stdout] 62 | db::store_voter(&db, &id_votation, source_peer.to_string().as_str(), topic) [INFO] [stdout] | ^^^ help: change this to: `db` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:99:44 [INFO] [stdout] | [INFO] [stdout] 99 | if db::get_status_vote(&db, id_votation.as_str()).is_none() { [INFO] [stdout] | ^^^ help: change this to: `db` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:100:45 [INFO] [stdout] | [INFO] [stdout] 100 | db::new_status_vote(&db, id_votation.as_str(), &votation).ok()?; [INFO] [stdout] | ^^^ help: change this to: `db` [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 `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> protocol-p2p/src/handler.rs:116:21 [INFO] [stdout] | [INFO] [stdout] 116 | / let Some(mut votation) = db::get_status_vote(&db, &id_votation) else { [INFO] [stdout] 117 | | return None; [INFO] [stdout] 118 | | }; [INFO] [stdout] | |______________________^ help: replace it with: `let mut votation = db::get_status_vote(&db, &id_votation)?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:116:66 [INFO] [stdout] | [INFO] [stdout] 116 | let Some(mut votation) = db::get_status_vote(&db, &id_votation) else { [INFO] [stdout] | ^^^ help: change this to: `db` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:140:57 [INFO] [stdout] | [INFO] [stdout] 140 | let Ok(exist) = db::exists_vote(db, &id_votation.as_str(), &str_peer_id) else { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `id_votation.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:154:41 [INFO] [stdout] | [INFO] [stdout] 154 | if db::add_vote(db, &id_votation.as_str(), &str_peer_id, &result).is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `id_votation.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:165:43 [INFO] [stdout] | [INFO] [stdout] 165 | db::get_votes(db, &id_votation.as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `id_votation.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:196:52 [INFO] [stdout] | [INFO] [stdout] 196 | db::update_reputations(db, &topic, &reputations, DEFAULT_REPUTATION) [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:207:52 [INFO] [stdout] | [INFO] [stdout] 207 | db::update_reputations(db, &topic, &reputations, DEFAULT_REPUTATION) [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [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: using `clone` on type `Vote` which implements the `Copy` trait [INFO] [stdout] --> protocol-p2p/src/handler.rs:217:46 [INFO] [stdout] | [INFO] [stdout] 217 | ... .map(|(_, vote)| vote.clone() as u8 as f32) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*vote` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:237:48 [INFO] [stdout] | [INFO] [stdout] 237 | db::update_reputations(&db, &topic, &peer_ids, DEFAULT_REPUTATION).ok()?; [INFO] [stdout] | ^^^ help: change this to: `db` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:237:53 [INFO] [stdout] | [INFO] [stdout] 237 | db::update_reputations(&db, &topic, &peer_ids, DEFAULT_REPUTATION).ok()?; [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:252:55 [INFO] [stdout] | [INFO] [stdout] 252 | db::include_new_validated_content(&db, &data_content).ok()?; [INFO] [stdout] | ^^^ help: change this to: `db` [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: variable does not need to be mutable [INFO] [stdout] --> protocol-p2p/src/handler.rs:116:30 [INFO] [stdout] | [INFO] [stdout] 116 | let Some(mut votation) = db::get_status_vote(&db, &id_votation) else { [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> protocol-p2p/src/db.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 34 | let hash_content_id = s.finish(); [INFO] [stdout] | --------------------------------- unnecessary `let` binding [INFO] [stdout] 35 | hash_content_id [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] 34 ~ [INFO] [stdout] 35 ~ s.finish() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> protocol-p2p/src/db.rs:82:15 [INFO] [stdout] | [INFO] [stdout] 82 | db.insert(key.to_string(), serde_json::to_vec(&jury)?)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `&key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> protocol-p2p/src/db.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 101 | / if let Some(value) = db.get(key).ok()? { [INFO] [stdout] 102 | | if let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 103 | | return Some(reputation); [INFO] [stdout] 104 | | } [INFO] [stdout] 105 | | } [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] 101 ~ if let Some(value) = db.get(key).ok()? [INFO] [stdout] 102 ~ && let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 103 | return Some(reputation); [INFO] [stdout] 104 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> protocol-p2p/src/db.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 142 | return results; [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] 142 - return results; [INFO] [stdout] 142 + results [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> protocol-p2p/src/db.rs:140:10 [INFO] [stdout] | [INFO] [stdout] 140 | .filter_map(|x| x) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> protocol-p2p/src/db.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | / if let Ok((key, value)) = item { [INFO] [stdout] 132 | | if let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 133 | | if let Ok(peer_id) = String::from_utf8(key.to_vec()) { [INFO] [stdout] 134 | | return Some((peer_id, reputation)); [INFO] [stdout] ... | [INFO] [stdout] 137 | | } [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] 131 ~ if let Ok((key, value)) = item [INFO] [stdout] 132 ~ && let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 133 | if let Ok(peer_id) = String::from_utf8(key.to_vec()) { [INFO] [stdout] 134 | return Some((peer_id, reputation)); [INFO] [stdout] 135 | } [INFO] [stdout] 136 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> protocol-p2p/src/db.rs:132:17 [INFO] [stdout] | [INFO] [stdout] 132 | / if let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 133 | | if let Ok(peer_id) = String::from_utf8(key.to_vec()) { [INFO] [stdout] 134 | | return Some((peer_id, reputation)); [INFO] [stdout] 135 | | } [INFO] [stdout] 136 | | } [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] 132 ~ if let Ok(reputation) = serde_json::from_slice::(&value) [INFO] [stdout] 133 ~ && let Ok(peer_id) = String::from_utf8(key.to_vec()) { [INFO] [stdout] 134 | return Some((peer_id, reputation)); [INFO] [stdout] 135 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> protocol-p2p/src/db.rs:252:17 [INFO] [stdout] | [INFO] [stdout] 249 | / let value = serde_json::from_slice::<(&str, Vote)>(&value) [INFO] [stdout] 250 | | .ok() [INFO] [stdout] 251 | | .map(|(s, vote)| (s.to_string(), vote)); [INFO] [stdout] | |____________________________________________________________- unnecessary `let` binding [INFO] [stdout] 252 | value [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 249 ~ [INFO] [stdout] 250 ~ serde_json::from_slice::<(&str, Vote)>(&value) [INFO] [stdout] 251 + .ok() [INFO] [stdout] 252 + .map(|(s, vote)| (s.to_string(), vote)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> protocol-p2p/src/db.rs:269:9 [INFO] [stdout] | [INFO] [stdout] 269 | key.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `&key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Vote` which implements the `Copy` trait [INFO] [stdout] --> protocol-p2p/src/db.rs:270:39 [INFO] [stdout] | [INFO] [stdout] 270 | serde_json::to_vec(&(peer_id, vote.clone()))?, [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*vote` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> protocol-p2p/src/db.rs:304:15 [INFO] [stdout] | [INFO] [stdout] 304 | let key = format!("pending_content/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"pending_content/".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/db.rs:359:22 [INFO] [stdout] | [INFO] [stdout] 359 | store_voter(&db, &id_votation, "peer1", topic).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `id_votation` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/db.rs:360:22 [INFO] [stdout] | [INFO] [stdout] 360 | store_voter(&db, &id_votation, "peer2", topic).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `id_votation` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/db.rs:362:34 [INFO] [stdout] | [INFO] [stdout] 362 | let voters = get_voters(&db, &id_votation, topic).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `id_votation` [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: deref which would be done by auto-deref [INFO] [stdout] --> protocol-p2p/src/db.rs:438:5 [INFO] [stdout] | [INFO] [stdout] 438 | (*result.votes_id.get_mut(0).unwrap()).0 = "peer_modified".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `result.votes_id.get_mut(0).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `find_key` [INFO] [stdout] --> protocol-p2p/src/db.rs:248:24 [INFO] [stdout] | [INFO] [stdout] 248 | if let Ok((find_key, value)) = item { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_find_key` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PeerId` which implements the `Copy` trait [INFO] [stdout] --> protocol-p2p/src/client.rs:38:17 [INFO] [stdout] | [INFO] [stdout] 38 | 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] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PeerId` which implements the `Copy` trait [INFO] [stdout] --> protocol-p2p/src/client.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | self.peer_id.clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.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] [stderr] Checking hyper-rustls v0.27.7 [INFO] [stderr] Checking hyper-tls v0.6.0 [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/client.rs:156:34 [INFO] [stdout] | [INFO] [stdout] 156 | db::get_voters(&self.db, &key, &topic) [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] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking axum v0.8.4 [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/client.rs:156:40 [INFO] [stdout] | [INFO] [stdout] 156 | db::get_voters(&self.db, &key, &topic) [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/client.rs:228:72 [INFO] [stdout] | [INFO] [stdout] 228 | for possible_voter_peer_id in db::get_voters(&self.db, &key, &topic)? { [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/client.rs:228:78 [INFO] [stdout] | [INFO] [stdout] 228 | for possible_voter_peer_id in db::get_voters(&self.db, &key, &topic)? { [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/client.rs:230:54 [INFO] [stdout] | [INFO] [stdout] 230 | db::get_reputation(&self.db, &possible_voter_peer_id.as_str(), &topic) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `possible_voter_peer_id.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/client.rs:230:88 [INFO] [stdout] | [INFO] [stdout] 230 | db::get_reputation(&self.db, &possible_voter_peer_id.as_str(), &topic) [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/client.rs:235:37 [INFO] [stdout] | [INFO] [stdout] 235 | ... &topic, [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/client.rs:236:37 [INFO] [stdout] | [INFO] [stdout] 236 | ... &possible_voter_peer_id.as_str(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `possible_voter_peer_id.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:52:56 [INFO] [stdout] | [INFO] [stdout] 52 | db::my_pending_content_to_validate(&db, &data_content).ok()?; [INFO] [stdout] | ^^^ help: change this to: `db` [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: `to_string` applied to a type that implements `Display` in `debug!` args [INFO] [stdout] --> protocol-p2p/src/handler.rs:60:36 [INFO] [stdout] | [INFO] [stdout] 60 | source_peer.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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:62:37 [INFO] [stdout] | [INFO] [stdout] 62 | db::store_voter(&db, &id_votation, source_peer.to_string().as_str(), topic) [INFO] [stdout] | ^^^ help: change this to: `db` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:99:44 [INFO] [stdout] | [INFO] [stdout] 99 | if db::get_status_vote(&db, id_votation.as_str()).is_none() { [INFO] [stdout] | ^^^ help: change this to: `db` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:100:45 [INFO] [stdout] | [INFO] [stdout] 100 | db::new_status_vote(&db, id_votation.as_str(), &votation).ok()?; [INFO] [stdout] | ^^^ help: change this to: `db` [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 `let...else` may be rewritten with the `?` operator [INFO] [stdout] --> protocol-p2p/src/handler.rs:116:21 [INFO] [stdout] | [INFO] [stdout] 116 | / let Some(mut votation) = db::get_status_vote(&db, &id_votation) else { [INFO] [stdout] 117 | | return None; [INFO] [stdout] 118 | | }; [INFO] [stdout] | |______________________^ help: replace it with: `let mut votation = db::get_status_vote(&db, &id_votation)?;` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:116:66 [INFO] [stdout] | [INFO] [stdout] 116 | let Some(mut votation) = db::get_status_vote(&db, &id_votation) else { [INFO] [stdout] | ^^^ help: change this to: `db` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:140:57 [INFO] [stdout] | [INFO] [stdout] 140 | let Ok(exist) = db::exists_vote(db, &id_votation.as_str(), &str_peer_id) else { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `id_votation.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:154:41 [INFO] [stdout] | [INFO] [stdout] 154 | if db::add_vote(db, &id_votation.as_str(), &str_peer_id, &result).is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `id_votation.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:165:43 [INFO] [stdout] | [INFO] [stdout] 165 | db::get_votes(db, &id_votation.as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `id_votation.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:196:52 [INFO] [stdout] | [INFO] [stdout] 196 | db::update_reputations(db, &topic, &reputations, DEFAULT_REPUTATION) [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:207:52 [INFO] [stdout] | [INFO] [stdout] 207 | db::update_reputations(db, &topic, &reputations, DEFAULT_REPUTATION) [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [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: using `clone` on type `Vote` which implements the `Copy` trait [INFO] [stdout] --> protocol-p2p/src/handler.rs:217:46 [INFO] [stdout] | [INFO] [stdout] 217 | ... .map(|(_, vote)| vote.clone() as u8 as f32) [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*vote` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:237:48 [INFO] [stdout] | [INFO] [stdout] 237 | db::update_reputations(&db, &topic, &peer_ids, DEFAULT_REPUTATION).ok()?; [INFO] [stdout] | ^^^ help: change this to: `db` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:237:53 [INFO] [stdout] | [INFO] [stdout] 237 | db::update_reputations(&db, &topic, &peer_ids, DEFAULT_REPUTATION).ok()?; [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/handler.rs:252:55 [INFO] [stdout] | [INFO] [stdout] 252 | db::include_new_validated_content(&db, &data_content).ok()?; [INFO] [stdout] | ^^^ help: change this to: `db` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> protocol-p2p/src/db.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 34 | let hash_content_id = s.finish(); [INFO] [stdout] | --------------------------------- unnecessary `let` binding [INFO] [stdout] 35 | hash_content_id [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] 34 ~ [INFO] [stdout] 35 ~ s.finish() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> protocol-p2p/src/db.rs:82:15 [INFO] [stdout] | [INFO] [stdout] 82 | db.insert(key.to_string(), serde_json::to_vec(&jury)?)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `&key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> protocol-p2p/src/db.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 101 | / if let Some(value) = db.get(key).ok()? { [INFO] [stdout] 102 | | if let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 103 | | return Some(reputation); [INFO] [stdout] 104 | | } [INFO] [stdout] 105 | | } [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] 101 ~ if let Some(value) = db.get(key).ok()? [INFO] [stdout] 102 ~ && let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 103 | return Some(reputation); [INFO] [stdout] 104 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> protocol-p2p/src/db.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 142 | return results; [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] 142 - return results; [INFO] [stdout] 142 + results [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> protocol-p2p/src/db.rs:140:10 [INFO] [stdout] | [INFO] [stdout] 140 | .filter_map(|x| x) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> protocol-p2p/src/db.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | / if let Ok((key, value)) = item { [INFO] [stdout] 132 | | if let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 133 | | if let Ok(peer_id) = String::from_utf8(key.to_vec()) { [INFO] [stdout] 134 | | return Some((peer_id, reputation)); [INFO] [stdout] ... | [INFO] [stdout] 137 | | } [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] 131 ~ if let Ok((key, value)) = item [INFO] [stdout] 132 ~ && let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 133 | if let Ok(peer_id) = String::from_utf8(key.to_vec()) { [INFO] [stdout] 134 | return Some((peer_id, reputation)); [INFO] [stdout] 135 | } [INFO] [stdout] 136 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> protocol-p2p/src/db.rs:132:17 [INFO] [stdout] | [INFO] [stdout] 132 | / if let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 133 | | if let Ok(peer_id) = String::from_utf8(key.to_vec()) { [INFO] [stdout] 134 | | return Some((peer_id, reputation)); [INFO] [stdout] 135 | | } [INFO] [stdout] 136 | | } [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] 132 ~ if let Ok(reputation) = serde_json::from_slice::(&value) [INFO] [stdout] 133 ~ && let Ok(peer_id) = String::from_utf8(key.to_vec()) { [INFO] [stdout] 134 | return Some((peer_id, reputation)); [INFO] [stdout] 135 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> protocol-p2p/src/db.rs:252:17 [INFO] [stdout] | [INFO] [stdout] 249 | / let value = serde_json::from_slice::<(&str, Vote)>(&value) [INFO] [stdout] 250 | | .ok() [INFO] [stdout] 251 | | .map(|(s, vote)| (s.to_string(), vote)); [INFO] [stdout] | |____________________________________________________________- unnecessary `let` binding [INFO] [stdout] 252 | value [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 249 ~ [INFO] [stdout] 250 ~ serde_json::from_slice::<(&str, Vote)>(&value) [INFO] [stdout] 251 + .ok() [INFO] [stdout] 252 + .map(|(s, vote)| (s.to_string(), vote)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> protocol-p2p/src/db.rs:269:9 [INFO] [stdout] | [INFO] [stdout] 269 | key.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `&key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Vote` which implements the `Copy` trait [INFO] [stdout] --> protocol-p2p/src/db.rs:270:39 [INFO] [stdout] | [INFO] [stdout] 270 | serde_json::to_vec(&(peer_id, vote.clone()))?, [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*vote` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> protocol-p2p/src/db.rs:304:15 [INFO] [stdout] | [INFO] [stdout] 304 | let key = format!("pending_content/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"pending_content/".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking reqwest v0.12.23 [INFO] [stdout] warning: unused imports: `StateContent` and `VoteStatus` [INFO] [stdout] --> protocol-p2p/src/db.rs:1:38 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::models::db::{DataContent, StateContent, Topic, Votation, VoteStatus}; [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: `db` [INFO] [stdout] --> protocol-p2p/src/db.rs:3:13 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::{db, models}; [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `chrono::Utc` [INFO] [stdout] --> protocol-p2p/src/db.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use chrono::Utc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> protocol-p2p/src/db.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | use serde_json; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> protocol-p2p/src/db.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | use sled; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Arc` [INFO] [stdout] --> protocol-p2p/src/db.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use std::sync::Arc; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Deserialize` and `Serialize` [INFO] [stdout] --> protocol-p2p/src/models.rs:1:13 [INFO] [stdout] | [INFO] [stdout] 1 | use serde::{Deserialize, Serialize}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `VoteStatus` [INFO] [stdout] --> protocol-p2p/src/db.rs:1:69 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::models::db::{DataContent, StateContent, Topic, Votation, VoteStatus}; [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: `chrono::Utc` [INFO] [stdout] --> protocol-p2p/src/db.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use chrono::Utc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> protocol-p2p/src/db.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | use serde_json; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> protocol-p2p/src/db.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | use sled; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Arc` [INFO] [stdout] --> protocol-p2p/src/db.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use std::sync::Arc; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Deserialize` and `Serialize` [INFO] [stdout] --> protocol-p2p/src/models.rs:1:13 [INFO] [stdout] | [INFO] [stdout] 1 | use serde::{Deserialize, Serialize}; [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `find_key` [INFO] [stdout] --> protocol-p2p/src/db.rs:248:24 [INFO] [stdout] | [INFO] [stdout] 248 | if let Ok((find_key, value)) = item { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_find_key` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `find_key` [INFO] [stdout] --> protocol-p2p/src/db.rs:248:24 [INFO] [stdout] | [INFO] [stdout] 248 | if let Ok((find_key, value)) = item { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_find_key` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> protocol-p2p/src/db.rs:441:9 [INFO] [stdout] | [INFO] [stdout] 441 | let mut result = get_status_vote(&db, &vote.id_votation).unwrap(); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `update_reputations` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:145:8 [INFO] [stdout] | [INFO] [stdout] 145 | pub fn update_reputations( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_topics` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:175:14 [INFO] [stdout] | [INFO] [stdout] 175 | pub async fn get_topics(db: &Db) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `save_topic` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:187:14 [INFO] [stdout] | [INFO] [stdout] 187 | pub async fn save_topic(db: &Db, topic: &Topic) -> anyhow::Result<()> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `my_pending_content_to_validate` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:221:8 [INFO] [stdout] | [INFO] [stdout] 221 | pub fn my_pending_content_to_validate(db: &Db, data_content: &DataContent) -> anyhow::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_my_pending_to_contents_to_validate` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:230:8 [INFO] [stdout] | [INFO] [stdout] 230 | pub fn get_my_pending_to_contents_to_validate(db: &Db) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_votes` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:244:8 [INFO] [stdout] | [INFO] [stdout] 244 | pub fn get_votes(db: &Db, id_votation: &str) -> Vec<(String, Vote)> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `exists_vote` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:260:8 [INFO] [stdout] | [INFO] [stdout] 260 | pub fn exists_vote(db: &Db, id_votation: &str, peer_id: &str) -> anyhow::Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_vote` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:266:8 [INFO] [stdout] | [INFO] [stdout] 266 | pub fn add_vote(db: &Db, id_votation: &str, peer_id: &str, vote: &Vote) -> anyhow::Result<()> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `create_key_for_voting_db` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn create_key_for_voting_db( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `create_key_without_status` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:26:8 [INFO] [stdout] | [INFO] [stdout] 26 | pub fn create_key_without_status(content_id: &str, topic: &str) -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `default_hash` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | fn default_hash(content_id: &str) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `store_voter` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:55:8 [INFO] [stdout] | [INFO] [stdout] 55 | pub fn store_voter( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_reputation` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:98:8 [INFO] [stdout] | [INFO] [stdout] 98 | pub fn get_reputation(db: &sled::Db, topic: &str, peer_id: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_reputation` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:109:8 [INFO] [stdout] | [INFO] [stdout] 109 | pub fn set_reputation( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `update_reputations` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:145:8 [INFO] [stdout] | [INFO] [stdout] 145 | pub fn update_reputations( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_topics` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:175:14 [INFO] [stdout] | [INFO] [stdout] 175 | pub async fn get_topics(db: &Db) -> Vec { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `save_topic` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:187:14 [INFO] [stdout] | [INFO] [stdout] 187 | pub async fn save_topic(db: &Db, topic: &Topic) -> anyhow::Result<()> { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `include_new_validated_content` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:196:8 [INFO] [stdout] | [INFO] [stdout] 196 | pub fn include_new_validated_content( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `my_pending_content_to_validate` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:221:8 [INFO] [stdout] | [INFO] [stdout] 221 | pub fn my_pending_content_to_validate(db: &Db, data_content: &DataContent) -> anyhow::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_my_pending_to_contents_to_validate` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:230:8 [INFO] [stdout] | [INFO] [stdout] 230 | pub fn get_my_pending_to_contents_to_validate(db: &Db) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_votes` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:244:8 [INFO] [stdout] | [INFO] [stdout] 244 | pub fn get_votes(db: &Db, id_votation: &str) -> Vec<(String, Vote)> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `exists_vote` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:260:8 [INFO] [stdout] | [INFO] [stdout] 260 | pub fn exists_vote(db: &Db, id_votation: &str, peer_id: &str) -> anyhow::Result { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_vote` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:266:8 [INFO] [stdout] | [INFO] [stdout] 266 | pub fn add_vote(db: &Db, id_votation: &str, peer_id: &str, vote: &Vote) -> anyhow::Result<()> { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `new_status_vote` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:276:8 [INFO] [stdout] | [INFO] [stdout] 276 | pub fn new_status_vote( [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_status_vote` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:296:8 [INFO] [stdout] | [INFO] [stdout] 296 | pub fn get_status_vote(db: &sled::Db, id_votation: &str) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_status_voteses` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:303:8 [INFO] [stdout] | [INFO] [stdout] 303 | pub fn get_status_voteses(db: &sled::Db) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `compare_and_swap_status_vote` is never used [INFO] [stdout] --> protocol-p2p/src/db.rs:316:8 [INFO] [stdout] | [INFO] [stdout] 316 | pub fn compare_and_swap_status_vote( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Topic` is never constructed [INFO] [stdout] --> protocol-p2p/src/models.rs:9:16 [INFO] [stdout] | [INFO] [stdout] 9 | pub struct Topic { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> protocol-p2p/src/models.rs:15:16 [INFO] [stdout] | [INFO] [stdout] 14 | impl Topic { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 15 | pub fn new(name: &str, description: &str) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Votation` is never constructed [INFO] [stdout] --> protocol-p2p/src/models.rs:24:16 [INFO] [stdout] | [INFO] [stdout] 24 | pub struct Votation { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> protocol-p2p/src/models.rs:35:16 [INFO] [stdout] | [INFO] [stdout] 34 | impl Votation { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 35 | pub fn new( [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `VoteStatus` is never used [INFO] [stdout] --> protocol-p2p/src/models.rs:55:14 [INFO] [stdout] | [INFO] [stdout] 55 | pub enum VoteStatus { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> protocol-p2p/src/models.rs:75:16 [INFO] [stdout] | [INFO] [stdout] 74 | impl DataContent { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] 75 | pub fn new(id_votation: String, content: String, approved: bool) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `DEFAULT_TOPIC` is never used [INFO] [stdout] --> protocol-p2p/src/models.rs:168:16 [INFO] [stdout] | [INFO] [stdout] 168 | pub static DEFAULT_TOPIC: Lazy = Lazy::new(|| IdentTopic::new("chat-room")); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Vote` is never used [INFO] [stdout] --> protocol-p2p/src/models.rs:171:14 [INFO] [stdout] | [INFO] [stdout] 171 | pub enum Vote { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ContentMessage` is never used [INFO] [stdout] --> protocol-p2p/src/models.rs:178:14 [INFO] [stdout] | [INFO] [stdout] 178 | pub enum ContentMessage { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new_vote_leader_request` is never used [INFO] [stdout] --> protocol-p2p/src/models.rs:210:16 [INFO] [stdout] | [INFO] [stdout] 209 | impl ContentMessage { [INFO] [stdout] | ------------------- associated function in this implementation [INFO] [stdout] 210 | pub fn new_vote_leader_request( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Topic` is never constructed [INFO] [stdout] --> protocol-p2p/src/models.rs:9:16 [INFO] [stdout] | [INFO] [stdout] 9 | pub struct Topic { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> protocol-p2p/src/models.rs:15:16 [INFO] [stdout] | [INFO] [stdout] 14 | impl Topic { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 15 | pub fn new(name: &str, description: &str) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `VoteStatus` is never used [INFO] [stdout] --> protocol-p2p/src/models.rs:55:14 [INFO] [stdout] | [INFO] [stdout] 55 | pub enum VoteStatus { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `DEFAULT_TOPIC` is never used [INFO] [stdout] --> protocol-p2p/src/models.rs:168:16 [INFO] [stdout] | [INFO] [stdout] 168 | pub static DEFAULT_TOPIC: Lazy = Lazy::new(|| IdentTopic::new("chat-room")); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Vote` is never used [INFO] [stdout] --> protocol-p2p/src/models.rs:171:14 [INFO] [stdout] | [INFO] [stdout] 171 | pub enum Vote { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `ContentMessage` is never used [INFO] [stdout] --> protocol-p2p/src/models.rs:178:14 [INFO] [stdout] | [INFO] [stdout] 178 | pub enum ContentMessage { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new_vote_leader_request` is never used [INFO] [stdout] --> protocol-p2p/src/models.rs:210:16 [INFO] [stdout] | [INFO] [stdout] 209 | impl ContentMessage { [INFO] [stdout] | ------------------- associated function in this implementation [INFO] [stdout] 210 | pub fn new_vote_leader_request( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> protocol-p2p/src/db.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 34 | let hash_content_id = s.finish(); [INFO] [stdout] | --------------------------------- unnecessary `let` binding [INFO] [stdout] 35 | hash_content_id [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] 34 ~ [INFO] [stdout] 35 ~ s.finish() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> protocol-p2p/src/db.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 34 | let hash_content_id = s.finish(); [INFO] [stdout] | --------------------------------- unnecessary `let` binding [INFO] [stdout] 35 | hash_content_id [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] 34 ~ [INFO] [stdout] 35 ~ s.finish() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> protocol-p2p/src/db.rs:82:15 [INFO] [stdout] | [INFO] [stdout] 82 | db.insert(key.to_string(), serde_json::to_vec(&jury)?)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `&key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> protocol-p2p/src/db.rs:82:15 [INFO] [stdout] | [INFO] [stdout] 82 | db.insert(key.to_string(), serde_json::to_vec(&jury)?)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `&key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> protocol-p2p/src/db.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 101 | / if let Some(value) = db.get(key).ok()? { [INFO] [stdout] 102 | | if let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 103 | | return Some(reputation); [INFO] [stdout] 104 | | } [INFO] [stdout] 105 | | } [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] 101 ~ if let Some(value) = db.get(key).ok()? [INFO] [stdout] 102 ~ && let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 103 | return Some(reputation); [INFO] [stdout] 104 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> protocol-p2p/src/db.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 101 | / if let Some(value) = db.get(key).ok()? { [INFO] [stdout] 102 | | if let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 103 | | return Some(reputation); [INFO] [stdout] 104 | | } [INFO] [stdout] 105 | | } [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] 101 ~ if let Some(value) = db.get(key).ok()? [INFO] [stdout] 102 ~ && let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 103 | return Some(reputation); [INFO] [stdout] 104 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> protocol-p2p/src/db.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 142 | return results; [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] 142 - return results; [INFO] [stdout] 142 + results [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> protocol-p2p/src/db.rs:140:10 [INFO] [stdout] | [INFO] [stdout] 140 | .filter_map(|x| x) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> protocol-p2p/src/db.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | / if let Ok((key, value)) = item { [INFO] [stdout] 132 | | if let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 133 | | if let Ok(peer_id) = String::from_utf8(key.to_vec()) { [INFO] [stdout] 134 | | return Some((peer_id, reputation)); [INFO] [stdout] ... | [INFO] [stdout] 137 | | } [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] 131 ~ if let Ok((key, value)) = item [INFO] [stdout] 132 ~ && let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 133 | if let Ok(peer_id) = String::from_utf8(key.to_vec()) { [INFO] [stdout] 134 | return Some((peer_id, reputation)); [INFO] [stdout] 135 | } [INFO] [stdout] 136 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> protocol-p2p/src/db.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 142 | return results; [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] 142 - return results; [INFO] [stdout] 142 + results [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> protocol-p2p/src/db.rs:132:17 [INFO] [stdout] | [INFO] [stdout] 132 | / if let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 133 | | if let Ok(peer_id) = String::from_utf8(key.to_vec()) { [INFO] [stdout] 134 | | return Some((peer_id, reputation)); [INFO] [stdout] 135 | | } [INFO] [stdout] 136 | | } [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] 132 ~ if let Ok(reputation) = serde_json::from_slice::(&value) [INFO] [stdout] 133 ~ && let Ok(peer_id) = String::from_utf8(key.to_vec()) { [INFO] [stdout] 134 | return Some((peer_id, reputation)); [INFO] [stdout] 135 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `filter_map` with an identity function [INFO] [stdout] --> protocol-p2p/src/db.rs:140:10 [INFO] [stdout] | [INFO] [stdout] 140 | .filter_map(|x| x) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `flatten()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity [INFO] [stdout] = note: `#[warn(clippy::filter_map_identity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> protocol-p2p/src/db.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | / if let Ok((key, value)) = item { [INFO] [stdout] 132 | | if let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 133 | | if let Ok(peer_id) = String::from_utf8(key.to_vec()) { [INFO] [stdout] 134 | | return Some((peer_id, reputation)); [INFO] [stdout] ... | [INFO] [stdout] 137 | | } [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] 131 ~ if let Ok((key, value)) = item [INFO] [stdout] 132 ~ && let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 133 | if let Ok(peer_id) = String::from_utf8(key.to_vec()) { [INFO] [stdout] 134 | return Some((peer_id, reputation)); [INFO] [stdout] 135 | } [INFO] [stdout] 136 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> protocol-p2p/src/db.rs:132:17 [INFO] [stdout] | [INFO] [stdout] 132 | / if let Ok(reputation) = serde_json::from_slice::(&value) { [INFO] [stdout] 133 | | if let Ok(peer_id) = String::from_utf8(key.to_vec()) { [INFO] [stdout] 134 | | return Some((peer_id, reputation)); [INFO] [stdout] 135 | | } [INFO] [stdout] 136 | | } [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] 132 ~ if let Ok(reputation) = serde_json::from_slice::(&value) [INFO] [stdout] 133 ~ && let Ok(peer_id) = String::from_utf8(key.to_vec()) { [INFO] [stdout] 134 | return Some((peer_id, reputation)); [INFO] [stdout] 135 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> protocol-p2p/src/db.rs:252:17 [INFO] [stdout] | [INFO] [stdout] 249 | / let value = serde_json::from_slice::<(&str, Vote)>(&value) [INFO] [stdout] 250 | | .ok() [INFO] [stdout] 251 | | .map(|(s, vote)| (s.to_string(), vote)); [INFO] [stdout] | |____________________________________________________________- unnecessary `let` binding [INFO] [stdout] 252 | value [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 249 ~ [INFO] [stdout] 250 ~ serde_json::from_slice::<(&str, Vote)>(&value) [INFO] [stdout] 251 + .ok() [INFO] [stdout] 252 + .map(|(s, vote)| (s.to_string(), vote)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> protocol-p2p/src/db.rs:252:17 [INFO] [stdout] | [INFO] [stdout] 249 | / let value = serde_json::from_slice::<(&str, Vote)>(&value) [INFO] [stdout] 250 | | .ok() [INFO] [stdout] 251 | | .map(|(s, vote)| (s.to_string(), vote)); [INFO] [stdout] | |____________________________________________________________- unnecessary `let` binding [INFO] [stdout] 252 | value [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 249 ~ [INFO] [stdout] 250 ~ serde_json::from_slice::<(&str, Vote)>(&value) [INFO] [stdout] 251 + .ok() [INFO] [stdout] 252 + .map(|(s, vote)| (s.to_string(), vote)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> protocol-p2p/src/db.rs:269:9 [INFO] [stdout] | [INFO] [stdout] 269 | key.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `&key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> protocol-p2p/src/db.rs:269:9 [INFO] [stdout] | [INFO] [stdout] 269 | key.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `&key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Vote` which implements the `Copy` trait [INFO] [stdout] --> protocol-p2p/src/db.rs:270:39 [INFO] [stdout] | [INFO] [stdout] 270 | serde_json::to_vec(&(peer_id, vote.clone()))?, [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*vote` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Vote` which implements the `Copy` trait [INFO] [stdout] --> protocol-p2p/src/db.rs:270:39 [INFO] [stdout] | [INFO] [stdout] 270 | serde_json::to_vec(&(peer_id, vote.clone()))?, [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*vote` [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: useless use of `format!` [INFO] [stdout] --> protocol-p2p/src/db.rs:304:15 [INFO] [stdout] | [INFO] [stdout] 304 | let key = format!("pending_content/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"pending_content/".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> protocol-p2p/src/db.rs:304:15 [INFO] [stdout] | [INFO] [stdout] 304 | let key = format!("pending_content/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"pending_content/".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/db.rs:359:22 [INFO] [stdout] | [INFO] [stdout] 359 | store_voter(&db, &id_votation, "peer1", topic).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `id_votation` [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] --> protocol-p2p/src/db.rs:360:22 [INFO] [stdout] | [INFO] [stdout] 360 | store_voter(&db, &id_votation, "peer2", topic).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `id_votation` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/db.rs:362:34 [INFO] [stdout] | [INFO] [stdout] 362 | let voters = get_voters(&db, &id_votation, topic).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `id_votation` [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: deref which would be done by auto-deref [INFO] [stdout] --> protocol-p2p/src/db.rs:438:5 [INFO] [stdout] | [INFO] [stdout] 438 | (*result.votes_id.get_mut(0).unwrap()).0 = "peer_modified".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `result.votes_id.get_mut(0).unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PeerId` which implements the `Copy` trait [INFO] [stdout] --> protocol-p2p/src/main.rs:103:13 [INFO] [stdout] | [INFO] [stdout] 103 | 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] --> protocol-p2p/src/main.rs:110:31 [INFO] [stdout] | [INFO] [stdout] 110 | created_peer_ids.push(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: non-binding `let` on a future [INFO] [stdout] --> protocol-p2p/src/main.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | / let _ = tokio::task::spawn(async move { [INFO] [stdout] 113 | | let (tx, mut rx) = mpsc::channel(32); [INFO] [stdout] ... | [INFO] [stdout] 146 | | }); [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: using `clone` on type `PeerId` which implements the `Copy` trait [INFO] [stdout] --> protocol-p2p/src/main.rs:119:29 [INFO] [stdout] | [INFO] [stdout] 119 | let t_peer_id = client.peer_id().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `client.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: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> protocol-p2p/src/main.rs:127:24 [INFO] [stdout] | [INFO] [stdout] 127 | if let Ok(_) = serde_json::from_slice::(&message) { [INFO] [stdout] | -------^^^^^----------------------------------------------------- help: try: `if serde_json::from_slice::(&message).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> protocol-p2p/src/main.rs:153:32 [INFO] [stdout] | [INFO] [stdout] 153 | let db = Arc::new(init_db(&format!("myself_peer")).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"myself_peer".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `info!` args [INFO] [stdout] --> protocol-p2p/src/main.rs:155:45 [INFO] [stdout] | [INFO] [stdout] 155 | log::info!("Myself peer ID: {}", peer_id.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: using `clone` on type `PeerId` which implements the `Copy` trait [INFO] [stdout] --> protocol-p2p/src/main.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | 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: non-binding `let` on a future [INFO] [stdout] --> protocol-p2p/src/main.rs:171:5 [INFO] [stdout] | [INFO] [stdout] 171 | / let _ = tokio::task::spawn(async move { [INFO] [stdout] 172 | | log::info!("Myself listening for messages..."); [INFO] [stdout] 173 | | cloned_myself [INFO] [stdout] 174 | | .wait_for_validators() [INFO] [stdout] 175 | | .await [INFO] [stdout] 176 | | .expect("Failed to start listening"); [INFO] [stdout] 177 | | }); [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] [INFO] [stdout] [INFO] [stdout] warning: non-binding `let` on a future [INFO] [stdout] --> protocol-p2p/src/main.rs:181:5 [INFO] [stdout] | [INFO] [stdout] 181 | / let _ = tokio::task::spawn(async move { [INFO] [stdout] 182 | | // let mut mocked_peer_ids = Vec::new(); [INFO] [stdout] 183 | | while let Some(message) = my_rx.recv().await { [INFO] [stdout] 184 | | log::info!( [INFO] [stdout] ... | [INFO] [stdout] 201 | | }); [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] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> protocol-p2p/src/main.rs:188:20 [INFO] [stdout] | [INFO] [stdout] 188 | if let Ok(_) = serde_json::from_slice::(&message) { [INFO] [stdout] | -------^^^^^----------------------------------------------------- help: try: `if serde_json::from_slice::(&message).is_ok()` [INFO] [stdout] | [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 `PeerId` which implements the `Copy` trait [INFO] [stdout] --> protocol-p2p/src/main.rs:103:13 [INFO] [stdout] | [INFO] [stdout] 103 | 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] --> protocol-p2p/src/main.rs:110:31 [INFO] [stdout] | [INFO] [stdout] 110 | created_peer_ids.push(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: non-binding `let` on a future [INFO] [stdout] --> protocol-p2p/src/main.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | / let _ = tokio::task::spawn(async move { [INFO] [stdout] 113 | | let (tx, mut rx) = mpsc::channel(32); [INFO] [stdout] ... | [INFO] [stdout] 146 | | }); [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: using `clone` on type `PeerId` which implements the `Copy` trait [INFO] [stdout] --> protocol-p2p/src/main.rs:119:29 [INFO] [stdout] | [INFO] [stdout] 119 | let t_peer_id = client.peer_id().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `client.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: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> protocol-p2p/src/main.rs:127:24 [INFO] [stdout] | [INFO] [stdout] 127 | if let Ok(_) = serde_json::from_slice::(&message) { [INFO] [stdout] | -------^^^^^----------------------------------------------------- help: try: `if serde_json::from_slice::(&message).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/main.rs:222:31 [INFO] [stdout] | [INFO] [stdout] 222 | client.add_vote(&key, &topic, Vote::Yes).await.unwrap() [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [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: length comparison to zero [INFO] [stdout] --> protocol-p2p/src/main.rs:236:13 [INFO] [stdout] | [INFO] [stdout] 236 | assert!(voters.len() > 0, "No voters found for the key"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!voters.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: useless use of `format!` [INFO] [stdout] --> protocol-p2p/src/main.rs:153:32 [INFO] [stdout] | [INFO] [stdout] 153 | let db = Arc::new(init_db(&format!("myself_peer")).unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"myself_peer".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> protocol-p2p/src/main.rs:245:13 [INFO] [stdout] | [INFO] [stdout] 245 | assert!(reputations.len() > 0, "No voters found for the key"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!reputations.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `info!` args [INFO] [stdout] --> protocol-p2p/src/main.rs:155:45 [INFO] [stdout] | [INFO] [stdout] 155 | log::info!("Myself peer ID: {}", peer_id.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: using `clone` on type `PeerId` which implements the `Copy` trait [INFO] [stdout] --> protocol-p2p/src/main.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | 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: non-binding `let` on a future [INFO] [stdout] --> protocol-p2p/src/main.rs:171:5 [INFO] [stdout] | [INFO] [stdout] 171 | / let _ = tokio::task::spawn(async move { [INFO] [stdout] 172 | | log::info!("Myself listening for messages..."); [INFO] [stdout] 173 | | cloned_myself [INFO] [stdout] 174 | | .wait_for_validators() [INFO] [stdout] 175 | | .await [INFO] [stdout] 176 | | .expect("Failed to start listening"); [INFO] [stdout] 177 | | }); [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] [INFO] [stdout] [INFO] [stdout] warning: non-binding `let` on a future [INFO] [stdout] --> protocol-p2p/src/main.rs:181:5 [INFO] [stdout] | [INFO] [stdout] 181 | / let _ = tokio::task::spawn(async move { [INFO] [stdout] 182 | | // let mut mocked_peer_ids = Vec::new(); [INFO] [stdout] 183 | | while let Some(message) = my_rx.recv().await { [INFO] [stdout] 184 | | log::info!( [INFO] [stdout] ... | [INFO] [stdout] 201 | | }); [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] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> protocol-p2p/src/main.rs:188:20 [INFO] [stdout] | [INFO] [stdout] 188 | if let Ok(_) = serde_json::from_slice::(&message) { [INFO] [stdout] | -------^^^^^----------------------------------------------------- help: try: `if serde_json::from_slice::(&message).is_ok()` [INFO] [stdout] | [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> protocol-p2p/src/main.rs:222:31 [INFO] [stdout] | [INFO] [stdout] 222 | client.add_vote(&key, &topic, Vote::Yes).await.unwrap() [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [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: length comparison to zero [INFO] [stdout] --> protocol-p2p/src/main.rs:236:13 [INFO] [stdout] | [INFO] [stdout] 236 | assert!(voters.len() > 0, "No voters found for the key"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!voters.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> protocol-p2p/src/main.rs:245:13 [INFO] [stdout] | [INFO] [stdout] 245 | assert!(reputations.len() > 0, "No voters found for the key"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!reputations.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking meilisearch-sdk v0.29.1 [INFO] [stderr] Checking messages-p2p v0.1.0 (/opt/rustwide/workdir/messages-p2p) [INFO] [stdout] warning: unused import: `VoteStatus` [INFO] [stdout] --> messages-p2p/src/p2p/api.rs:8:62 [INFO] [stdout] | [INFO] [stdout] 8 | use protocol_p2p::models::db::{DataContent, Topic, Votation, VoteStatus}; [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: `VoteStatus` [INFO] [stdout] --> messages-p2p/src/p2p/api.rs:8:62 [INFO] [stdout] | [INFO] [stdout] 8 | use protocol_p2p::models::db::{DataContent, Topic, Votation, VoteStatus}; [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 variable: `message_id_fn` [INFO] [stdout] --> messages-p2p/src/p2p/behaviours.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let message_id_fn = |message: &gossipsub::Message| { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message_id_fn` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `message_id_fn` [INFO] [stdout] --> messages-p2p/src/p2p/behaviours.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let message_id_fn = |message: &gossipsub::Message| { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message_id_fn` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `keypair` and `p2p_port` are never read [INFO] [stdout] --> messages-p2p/src/p2p/bootstrap.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct BootstrapServer { [INFO] [stdout] | --------------- fields in this struct [INFO] [stdout] 24 | keypair: Keypair, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | p2p_port: i32, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> messages-p2p/src/p2p/api.rs:122:42 [INFO] [stdout] | [INFO] [stdout] 122 | db::save_topic(&self.db, &topic).await?; [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [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: fields `keypair` and `p2p_port` are never read [INFO] [stdout] --> messages-p2p/src/p2p/bootstrap.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct BootstrapServer { [INFO] [stdout] | --------------- fields in this struct [INFO] [stdout] 24 | keypair: Keypair, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | p2p_port: i32, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking bindings-p2p v0.1.0 (/opt/rustwide/workdir/bindings-p2p) [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> messages-p2p/src/p2p/api.rs:122:42 [INFO] [stdout] | [INFO] [stdout] 122 | db::save_topic(&self.db, &topic).await?; [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [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: unused imports: `APIError` and `VoteId` [INFO] [stdout] --> bindings-p2p/src/lib.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | APIError, ConnectionData, DataContent, Reputation, RuntimePendingContent, Topic, Votation, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 8 | Vote, VoteId, [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: `SystemTime` [INFO] [stdout] --> bindings-p2p/src/lib.rs:15:17 [INFO] [stdout] | [INFO] [stdout] 15 | use std::time::{SystemTime, UNIX_EPOCH}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `VoteStatus` [INFO] [stdout] --> messages-p2p/src/p2p/api.rs:8:62 [INFO] [stdout] | [INFO] [stdout] 8 | use protocol_p2p::models::db::{DataContent, Topic, Votation, VoteStatus}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated function `rand::thread_rng`: Renamed to `rng` [INFO] [stdout] --> messages-p2p/tests/integration_test.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::{thread_rng, Rng}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated function `rand::thread_rng`: Renamed to `rng` [INFO] [stdout] --> messages-p2p/tests/integration_test.rs:64:33 [INFO] [stdout] | [INFO] [stdout] 64 | let random_string: String = thread_rng() [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `VoteStatus` [INFO] [stdout] --> messages-p2p/src/p2p/api.rs:8:62 [INFO] [stdout] | [INFO] [stdout] 8 | use protocol_p2p::models::db::{DataContent, Topic, Votation, VoteStatus}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> messages-p2p/tests/integration_test.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 123 | let _ = handle.abort(); // Opcional: abortar o dejar vivir [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] 123 - let _ = handle.abort(); // Opcional: abortar o dejar vivir [INFO] [stdout] 123 + handle.abort(); // Opcional: abortar o dejar vivir [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `join_handle` [INFO] [stdout] --> messages-p2p/tests/functional_test.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let join_handle = run_relay_server(); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_join_handle` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> messages-p2p/tests/integration_test.rs:248:27 [INFO] [stdout] | [INFO] [stdout] 248 | client.peer_id.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] --> messages-p2p/tests/integration_test.rs:274:9 [INFO] [stdout] | [INFO] [stdout] 274 | let _ = handle.abort(); // Opcional: abortar o dejar vivir [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] 274 - let _ = handle.abort(); // Opcional: abortar o dejar vivir [INFO] [stdout] 274 + handle.abort(); // Opcional: abortar o dejar vivir [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> messages-p2p/tests/integration_test.rs:371:27 [INFO] [stdout] | [INFO] [stdout] 371 | client.peer_id.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] --> messages-p2p/tests/integration_test.rs:397:9 [INFO] [stdout] | [INFO] [stdout] 397 | let _ = handle.abort(); // Opcional: abortar o dejar vivir [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] 397 - let _ = handle.abort(); // Opcional: abortar o dejar vivir [INFO] [stdout] 397 + handle.abort(); // Opcional: abortar o dejar vivir [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> messages-p2p/tests/integration_test.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | std::fs::remove_dir_all(name_peer.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 29 | let _ = std::fs::remove_dir_all(name_peer.clone()); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> messages-p2p/tests/integration_test.rs:428:46 [INFO] [stdout] | [INFO] [stdout] 428 | let _ = std::fs::remove_dir_all(name_peer.clone()); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `APIError` and `VoteId` [INFO] [stdout] --> bindings-p2p/src/lib.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | APIError, ConnectionData, DataContent, Reputation, RuntimePendingContent, Topic, Votation, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 8 | Vote, VoteId, [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: `SystemTime` [INFO] [stdout] --> bindings-p2p/src/lib.rs:15:17 [INFO] [stdout] | [INFO] [stdout] 15 | use std::time::{SystemTime, UNIX_EPOCH}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:89:21 [INFO] [stdout] | [INFO] [stdout] 89 | let mut guard = wrapper.client.lock().await; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:106:17 [INFO] [stdout] | [INFO] [stdout] 106 | let mut guard = self.client.lock().await; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:121:17 [INFO] [stdout] | [INFO] [stdout] 121 | let mut guard = self.client.lock().await; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:132:17 [INFO] [stdout] | [INFO] [stdout] 132 | let mut guard = self.client.lock().await; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:148:21 [INFO] [stdout] | [INFO] [stdout] 148 | let mut guard = client.lock().await; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:164:21 [INFO] [stdout] | [INFO] [stdout] 164 | let mut locked = client.lock().await; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:176:17 [INFO] [stdout] | [INFO] [stdout] 176 | let mut locked = client.lock().await; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `message_id_fn` [INFO] [stdout] --> messages-p2p/src/p2p/behaviours.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let message_id_fn = |message: &gossipsub::Message| { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message_id_fn` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:232:21 [INFO] [stdout] | [INFO] [stdout] 232 | let mut guard = client.lock().await; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:238:17 [INFO] [stdout] | [INFO] [stdout] 238 | let mut guard = client.lock().await; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `types::StateContent` is more private than the item `types::DataContent::approved` [INFO] [stdout] --> bindings-p2p/src/types.rs:200:5 [INFO] [stdout] | [INFO] [stdout] 200 | pub approved: StateContent, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ field `types::DataContent::approved` is reachable at visibility `pub` [INFO] [stdout] | [INFO] [stdout] note: but type `types::StateContent` is only usable at visibility `pub(self)` [INFO] [stdout] --> bindings-p2p/src/types.rs:178:1 [INFO] [stdout] | [INFO] [stdout] 178 | enum StateContent { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `peer_id`, `server_address`, `server_peer_id`, and `username` are never read [INFO] [stdout] --> bindings-p2p/src/lib.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 51 | pub struct ClientWrapper { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] 52 | client: Arc>, [INFO] [stdout] 53 | peer_id: PeerId, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 54 | server_address: String, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 55 | server_peer_id: String, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 56 | username: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `APIError` is never used [INFO] [stdout] --> bindings-p2p/src/types.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | pub enum APIError { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Error` [INFO] [stdout] --> bindings-p2p/src/types.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | / pub enum APIError { [INFO] [stdout] 8 | | #[error("Error to connect to the server={addr} msg={msg}")] [INFO] [stdout] 9 | | ConnectionError { addr: String, msg: String }, [INFO] [stdout] 10 | | #[error("Concurrency error msg={msg}")] [INFO] [stdout] ... | [INFO] [stdout] 13 | | RuntimeError { msg: String }, [INFO] [stdout] 14 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `keypair` and `p2p_port` are never read [INFO] [stdout] --> messages-p2p/src/p2p/bootstrap.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct BootstrapServer { [INFO] [stdout] | --------------- fields in this struct [INFO] [stdout] 24 | keypair: Keypair, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | p2p_port: i32, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> messages-p2p/src/p2p/api.rs:122:42 [INFO] [stdout] | [INFO] [stdout] 122 | db::save_topic(&self.db, &topic).await?; [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [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: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:89:21 [INFO] [stdout] | [INFO] [stdout] 89 | let mut guard = wrapper.client.lock().await; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:106:17 [INFO] [stdout] | [INFO] [stdout] 106 | let mut guard = self.client.lock().await; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:121:17 [INFO] [stdout] | [INFO] [stdout] 121 | let mut guard = self.client.lock().await; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:132:17 [INFO] [stdout] | [INFO] [stdout] 132 | let mut guard = self.client.lock().await; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> bindings-p2p/src/types.rs:248:26 [INFO] [stdout] | [INFO] [stdout] 248 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:148:21 [INFO] [stdout] | [INFO] [stdout] 148 | let mut guard = client.lock().await; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:164:21 [INFO] [stdout] | [INFO] [stdout] 164 | let mut locked = client.lock().await; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:176:17 [INFO] [stdout] | [INFO] [stdout] 176 | let mut locked = client.lock().await; [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:232:21 [INFO] [stdout] | [INFO] [stdout] 232 | let mut guard = client.lock().await; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bindings-p2p/src/lib.rs:238:17 [INFO] [stdout] | [INFO] [stdout] 238 | let mut guard = client.lock().await; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> bindings-p2p/src/lib.rs:156:9 [INFO] [stdout] | [INFO] [stdout] 156 | / let vote = RUNTIME [INFO] [stdout] 157 | | .block_on(async { [INFO] [stdout] 158 | | let client = self.client.clone(); [INFO] [stdout] 159 | | let parser_vote = if vote.good { [INFO] [stdout] ... | [INFO] [stdout] 168 | | }) [INFO] [stdout] 169 | | .map_err(|e| PyRuntimeError::new_err(e.to_string()))?; [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 and replace variable usages with `()` [INFO] [stdout] | [INFO] [stdout] 156 ~ RUNTIME [INFO] [stdout] 157 | .block_on(async { [INFO] [stdout] ... [INFO] [stdout] 169 | .map_err(|e| PyRuntimeError::new_err(e.to_string()))?; [INFO] [stdout] 170 ~ Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `message_id_fn` [INFO] [stdout] --> messages-p2p/src/p2p/behaviours.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let message_id_fn = |message: &gossipsub::Message| { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message_id_fn` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `types::StateContent` is more private than the item `types::DataContent::approved` [INFO] [stdout] --> bindings-p2p/src/types.rs:200:5 [INFO] [stdout] | [INFO] [stdout] 200 | pub approved: StateContent, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ field `types::DataContent::approved` is reachable at visibility `pub` [INFO] [stdout] | [INFO] [stdout] note: but type `types::StateContent` is only usable at visibility `pub(self)` [INFO] [stdout] --> bindings-p2p/src/types.rs:178:1 [INFO] [stdout] | [INFO] [stdout] 178 | enum StateContent { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `peer_id`, `server_address`, `server_peer_id`, and `username` are never read [INFO] [stdout] --> bindings-p2p/src/lib.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 51 | pub struct ClientWrapper { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] 52 | client: Arc>, [INFO] [stdout] 53 | peer_id: PeerId, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 54 | server_address: String, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 55 | server_peer_id: String, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] 56 | username: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `APIError` is never used [INFO] [stdout] --> bindings-p2p/src/types.rs:7:10 [INFO] [stdout] | [INFO] [stdout] 7 | pub enum APIError { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: all variants have the same postfix: `Error` [INFO] [stdout] --> bindings-p2p/src/types.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | / pub enum APIError { [INFO] [stdout] 8 | | #[error("Error to connect to the server={addr} msg={msg}")] [INFO] [stdout] 9 | | ConnectionError { addr: String, msg: String }, [INFO] [stdout] 10 | | #[error("Concurrency error msg={msg}")] [INFO] [stdout] ... | [INFO] [stdout] 13 | | RuntimeError { msg: String }, [INFO] [stdout] 14 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: remove the postfixes and use full paths to the variants instead of glob imports [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> bindings-p2p/src/types.rs:248:26 [INFO] [stdout] | [INFO] [stdout] 248 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> bindings-p2p/src/lib.rs:308:5 [INFO] [stdout] | [INFO] [stdout] 308 | return data; [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] 308 - return data; [INFO] [stdout] 308 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> bindings-p2p/src/lib.rs:156:9 [INFO] [stdout] | [INFO] [stdout] 156 | / let vote = RUNTIME [INFO] [stdout] 157 | | .block_on(async { [INFO] [stdout] 158 | | let client = self.client.clone(); [INFO] [stdout] 159 | | let parser_vote = if vote.good { [INFO] [stdout] ... | [INFO] [stdout] 168 | | }) [INFO] [stdout] 169 | | .map_err(|e| PyRuntimeError::new_err(e.to_string()))?; [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 and replace variable usages with `()` [INFO] [stdout] | [INFO] [stdout] 156 ~ RUNTIME [INFO] [stdout] 157 | .block_on(async { [INFO] [stdout] ... [INFO] [stdout] 169 | .map_err(|e| PyRuntimeError::new_err(e.to_string()))?; [INFO] [stdout] 170 ~ Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> bindings-p2p/src/lib.rs:308:5 [INFO] [stdout] | [INFO] [stdout] 308 | return data; [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] 308 - return data; [INFO] [stdout] 308 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `keypair` and `p2p_port` are never read [INFO] [stdout] --> messages-p2p/src/p2p/bootstrap.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 23 | pub struct BootstrapServer { [INFO] [stdout] | --------------- fields in this struct [INFO] [stdout] 24 | keypair: Keypair, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 29 | p2p_port: i32, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> messages-p2p/src/p2p/api.rs:122:42 [INFO] [stdout] | [INFO] [stdout] 122 | db::save_topic(&self.db, &topic).await?; [INFO] [stdout] | ^^^^^^ help: change this to: `topic` [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] [stderr] Checking backend v0.1.0 (/opt/rustwide/workdir/backend) [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> backend/src/services/llmdb.rs:8:15 [INFO] [stdout] | [INFO] [stdout] 8 | const MODEL: &'static str = "links"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Json`, `Router`, `extract::Extension`, and `routing::post` [INFO] [stdout] --> backend/src/services/queue.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | use axum::{routing::post, Router, Json, extract::Extension}; [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: `net::SocketAddr` [INFO] [stdout] --> backend/src/services/queue.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | use std::{net::SocketAddr, sync::Arc}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::time::Duration` [INFO] [stdout] --> backend/src/services/p2p.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::time::Duration; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `axum::serve::Serve` [INFO] [stdout] --> backend/src/services/p2p.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use axum::serve::Serve; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `mongodb::event::sdam::ServerClosedEvent` [INFO] [stdout] --> backend/src/services/p2p.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use mongodb::event::sdam::ServerClosedEvent; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `DataContent` [INFO] [stdout] --> backend/src/services/p2p.rs:5:20 [INFO] [stdout] | [INFO] [stdout] 5 | use messages_p2p::{DataContent, Keypair, PeerId, StateContent, Votation, Vote}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `WSContentData` [INFO] [stdout] --> backend/src/services/p2p.rs:9:48 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::model::{Content, ContentToValidate, WSContentData, Topic}; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> backend/src/services/p2p.rs:87:17 [INFO] [stdout] | [INFO] [stdout] 87 | |t| (Topic {title: t.name.clone(),description: t.description.clone()} [INFO] [stdout] | _________________^________________________________________________________________^ [INFO] [stdout] 88 | | )).collect() [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 87 - |t| (Topic {title: t.name.clone(),description: t.description.clone()} [INFO] [stdout] 88 - )).collect() [INFO] [stdout] 87 + |t| Topic {title: t.name.clone(),description: t.description.clone()} ).collect() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Path` [INFO] [stdout] --> backend/src/routes/links.rs:2:22 [INFO] [stdout] | [INFO] [stdout] 2 | extract::{State, Path, Query}, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::services::queue::Task` [INFO] [stdout] --> backend/src/routes/links.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use crate::services::queue::Task; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `http::HeaderValue` [INFO] [stdout] --> backend/src/main.rs:9:74 [INFO] [stdout] | [INFO] [stdout] 9 | use axum::{extract::{ws::{Message, WebSocket}, State, WebSocketUpgrade}, http::HeaderValue, response::IntoResponse, routing::get, Rou... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `serde_json::json` [INFO] [stdout] --> backend/src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use serde_json::json; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::utils::fetch_data` [INFO] [stdout] --> backend/src/main.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use crate::utils::fetch_data; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> backend/src/services/llmdb.rs:8:15 [INFO] [stdout] | [INFO] [stdout] 8 | const MODEL: &'static str = "links"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Json`, `Router`, `extract::Extension`, and `routing::post` [INFO] [stdout] --> backend/src/services/queue.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | use axum::{routing::post, Router, Json, extract::Extension}; [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: `net::SocketAddr` [INFO] [stdout] --> backend/src/services/queue.rs:3:11 [INFO] [stdout] | [INFO] [stdout] 3 | use std::{net::SocketAddr, sync::Arc}; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `axum::serve::Serve` [INFO] [stdout] --> backend/src/services/p2p.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use axum::serve::Serve; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `mongodb::event::sdam::ServerClosedEvent` [INFO] [stdout] --> backend/src/services/p2p.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use mongodb::event::sdam::ServerClosedEvent; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `DataContent` [INFO] [stdout] --> backend/src/services/p2p.rs:5:20 [INFO] [stdout] | [INFO] [stdout] 5 | use messages_p2p::{DataContent, Keypair, PeerId, StateContent, Votation, Vote}; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `WSContentData` [INFO] [stdout] --> backend/src/services/p2p.rs:9:48 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::model::{Content, ContentToValidate, WSContentData, Topic}; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> backend/src/services/p2p.rs:87:17 [INFO] [stdout] | [INFO] [stdout] 87 | |t| (Topic {title: t.name.clone(),description: t.description.clone()} [INFO] [stdout] | _________________^________________________________________________________________^ [INFO] [stdout] 88 | | )).collect() [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 87 - |t| (Topic {title: t.name.clone(),description: t.description.clone()} [INFO] [stdout] 88 - )).collect() [INFO] [stdout] 87 + |t| Topic {title: t.name.clone(),description: t.description.clone()} ).collect() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Path` [INFO] [stdout] --> backend/src/routes/links.rs:2:22 [INFO] [stdout] | [INFO] [stdout] 2 | extract::{State, Path, Query}, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::services::queue::Task` [INFO] [stdout] --> backend/src/routes/links.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use crate::services::queue::Task; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `http::HeaderValue` [INFO] [stdout] --> backend/src/main.rs:9:74 [INFO] [stdout] | [INFO] [stdout] 9 | use axum::{extract::{ws::{Message, WebSocket}, State, WebSocketUpgrade}, http::HeaderValue, response::IntoResponse, routing::get, Rou... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `serde_json::json` [INFO] [stdout] --> backend/src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | use serde_json::json; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::utils::fetch_data` [INFO] [stdout] --> backend/src/main.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | use crate::utils::fetch_data; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `futures_util::FutureExt` [INFO] [stdout] --> backend/src/services/p2p.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use futures_util::FutureExt; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `id` [INFO] [stdout] --> backend/src/services/llmdb.rs:52:35 [INFO] [stdout] | [INFO] [stdout] 52 | pub async fn edit_link(&self, id: &str, link: &LLMDBLink) -> anyhow::Result> { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_id` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `reputations` [INFO] [stdout] --> backend/src/services/p2p.rs:92:13 [INFO] [stdout] | [INFO] [stdout] 92 | let reputations = self.client.get_reputations(topic.as_str()); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_reputations` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `client` [INFO] [stdout] --> backend/src/main.rs:176:13 [INFO] [stdout] | [INFO] [stdout] 176 | let client = client.clone(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_client` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `test` is never used [INFO] [stdout] --> backend/src/main.rs:36:25 [INFO] [stdout] | [INFO] [stdout] 35 | impl AppState { [INFO] [stdout] | ------------- associated function in this implementation [INFO] [stdout] 36 | pub(crate) async fn test() -> Self { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `client_id` is never read [INFO] [stdout] --> backend/src/services/p2p.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct ConnectionData { [INFO] [stdout] | -------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 22 | pub client_id: Option, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ConnectionData` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `futures_util::FutureExt` [INFO] [stdout] --> backend/src/services/p2p.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use futures_util::FutureExt; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LLMDB` contains a capitalized acronym [INFO] [stdout] --> backend/src/services/llmdb.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct LLMDB { [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Llmdb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> backend/src/services/p2p.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 29 | / let connection_data = ConnectionData { [INFO] [stdout] 30 | | server_id: tracker_info.id, [INFO] [stdout] 31 | | server_address: tracker_info.addresses.clone(), [INFO] [stdout] 32 | | client_id: None, [INFO] [stdout] 33 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 34 | connection_data [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] 29 ~ [INFO] [stdout] 30 ~ ConnectionData { [INFO] [stdout] 31 + server_id: tracker_info.id, [INFO] [stdout] 32 + server_address: tracker_info.addresses.clone(), [INFO] [stdout] 33 + client_id: None, [INFO] [stdout] 34 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> backend/src/services/p2p.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | &server_peer_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `server_peer_id` [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] --> backend/src/services/p2p.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | &server_address, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `server_address` [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: unused variable: `id` [INFO] [stdout] --> backend/src/services/llmdb.rs:52:35 [INFO] [stdout] | [INFO] [stdout] 52 | pub async fn edit_link(&self, id: &str, link: &LLMDBLink) -> anyhow::Result> { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_id` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> backend/src/services/p2p.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 115 | let res = self.client.add_vote(id_votation.as_str(), topic.as_str(), parsed_vote).await; [INFO] [stdout] | ---------------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 116 | res [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 115 ~ [INFO] [stdout] 116 ~ self.client.add_vote(id_votation.as_str(), topic.as_str(), parsed_vote).await [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> backend/src/routes/links.rs:52:16 [INFO] [stdout] | [INFO] [stdout] 52 | if let Some(_) = option_llmdb { [INFO] [stdout] | -------^^^^^^^--------------- help: try: `if option_llmdb.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> backend/src/routes/links.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | let _ = state.llmdb.delete_link(&id).await.map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; [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] 69 - let _ = state.llmdb.delete_link(&id).await.map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; [INFO] [stdout] 69 + state.llmdb.delete_link(&id).await.map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `reputations` [INFO] [stdout] --> backend/src/services/p2p.rs:92:13 [INFO] [stdout] | [INFO] [stdout] 92 | let reputations = self.client.get_reputations(topic.as_str()); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_reputations` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> backend/src/main.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 58 | let state = AppState{db, llmdb, tx, queue: None, p2p: None}; [INFO] [stdout] | ------------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 59 | state [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 58 ~ [INFO] [stdout] 59 ~ AppState{db, llmdb, tx, queue: None, p2p: None} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> backend/src/main.rs:137:23 [INFO] [stdout] | [INFO] [stdout] 137 | ws.on_upgrade(|websocket| mock_handle_websocket(websocket)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `mock_handle_websocket` [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 `match` can be collapsed into the outer `if let` [INFO] [stdout] --> backend/src/main.rs:192:13 [INFO] [stdout] | [INFO] [stdout] 192 | / match msg { [INFO] [stdout] 193 | | Message::Text(content) => { [INFO] [stdout] 194 | | println!("->{}", content); [INFO] [stdout] ... | [INFO] [stdout] 198 | | _ => () [INFO] [stdout] 199 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> backend/src/main.rs:191:19 [INFO] [stdout] | [INFO] [stdout] 191 | if let Ok(msg) = msg { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 192 | match msg { [INFO] [stdout] 193 | Message::Text(content) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ with this pattern [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] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> backend/src/main.rs:192:13 [INFO] [stdout] | [INFO] [stdout] 192 | / match msg { [INFO] [stdout] 193 | | Message::Text(content) => { [INFO] [stdout] 194 | | println!("->{}", content); [INFO] [stdout] ... | [INFO] [stdout] 198 | | _ => () [INFO] [stdout] 199 | | } [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] 192 ~ if let Message::Text(content) = msg { [INFO] [stdout] 193 + println!("->{}", content); [INFO] [stdout] 194 + //we send to another threead from the websocket for avoiding blockers [INFO] [stdout] 195 + send_to_app.send(content.to_string()).unwrap(); [INFO] [stdout] 196 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `client` [INFO] [stdout] --> backend/src/main.rs:176:13 [INFO] [stdout] | [INFO] [stdout] 176 | let client = client.clone(); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_client` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `client_id` is never read [INFO] [stdout] --> backend/src/services/p2p.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 19 | pub struct ConnectionData { [INFO] [stdout] | -------------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 22 | pub client_id: Option, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ConnectionData` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `LLMDB` contains a capitalized acronym [INFO] [stdout] --> backend/src/services/llmdb.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct LLMDB { [INFO] [stdout] | ^^^^^ help: consider making the acronym lowercase, except the initial letter: `Llmdb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> backend/src/services/p2p.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 29 | / let connection_data = ConnectionData { [INFO] [stdout] 30 | | server_id: tracker_info.id, [INFO] [stdout] 31 | | server_address: tracker_info.addresses.clone(), [INFO] [stdout] 32 | | client_id: None, [INFO] [stdout] 33 | | }; [INFO] [stdout] | |______- unnecessary `let` binding [INFO] [stdout] 34 | connection_data [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] 29 ~ [INFO] [stdout] 30 ~ ConnectionData { [INFO] [stdout] 31 + server_id: tracker_info.id, [INFO] [stdout] 32 + server_address: tracker_info.addresses.clone(), [INFO] [stdout] 33 + client_id: None, [INFO] [stdout] 34 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> backend/src/services/p2p.rs:54:13 [INFO] [stdout] | [INFO] [stdout] 54 | &server_peer_id, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `server_peer_id` [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] --> backend/src/services/p2p.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | &server_address, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `server_address` [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: returning the result of a `let` binding from a block [INFO] [stdout] --> backend/src/services/p2p.rs:116:9 [INFO] [stdout] | [INFO] [stdout] 115 | let res = self.client.add_vote(id_votation.as_str(), topic.as_str(), parsed_vote).await; [INFO] [stdout] | ---------------------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 116 | res [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 115 ~ [INFO] [stdout] 116 ~ self.client.add_vote(id_votation.as_str(), topic.as_str(), parsed_vote).await [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> backend/src/routes/links.rs:52:16 [INFO] [stdout] | [INFO] [stdout] 52 | if let Some(_) = option_llmdb { [INFO] [stdout] | -------^^^^^^^--------------- help: try: `if option_llmdb.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> backend/src/routes/links.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | let _ = state.llmdb.delete_link(&id).await.map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; [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] 69 - let _ = state.llmdb.delete_link(&id).await.map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; [INFO] [stdout] 69 + state.llmdb.delete_link(&id).await.map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> backend/src/main.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 58 | let state = AppState{db, llmdb, tx, queue: None, p2p: None}; [INFO] [stdout] | ------------------------------------------------------------ unnecessary `let` binding [INFO] [stdout] 59 | state [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 58 ~ [INFO] [stdout] 59 ~ AppState{db, llmdb, tx, queue: None, p2p: None} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> backend/src/main.rs:137:23 [INFO] [stdout] | [INFO] [stdout] 137 | ws.on_upgrade(|websocket| mock_handle_websocket(websocket)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `mock_handle_websocket` [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 `match` can be collapsed into the outer `if let` [INFO] [stdout] --> backend/src/main.rs:192:13 [INFO] [stdout] | [INFO] [stdout] 192 | / match msg { [INFO] [stdout] 193 | | Message::Text(content) => { [INFO] [stdout] 194 | | println!("->{}", content); [INFO] [stdout] ... | [INFO] [stdout] 198 | | _ => () [INFO] [stdout] 199 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> backend/src/main.rs:191:19 [INFO] [stdout] | [INFO] [stdout] 191 | if let Ok(msg) = msg { [INFO] [stdout] | ^^^ replace this binding [INFO] [stdout] 192 | match msg { [INFO] [stdout] 193 | Message::Text(content) => { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ with this pattern [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] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> backend/src/main.rs:192:13 [INFO] [stdout] | [INFO] [stdout] 192 | / match msg { [INFO] [stdout] 193 | | Message::Text(content) => { [INFO] [stdout] 194 | | println!("->{}", content); [INFO] [stdout] ... | [INFO] [stdout] 198 | | _ => () [INFO] [stdout] 199 | | } [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] 192 ~ if let Message::Text(content) = msg { [INFO] [stdout] 193 + println!("->{}", content); [INFO] [stdout] 194 + //we send to another threead from the websocket for avoiding blockers [INFO] [stdout] 195 + send_to_app.send(content.to_string()).unwrap(); [INFO] [stdout] 196 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> backend/src/main.rs:246:53 [INFO] [stdout] | [INFO] [stdout] 246 | let new_id: String = serde_json::from_slice(&*bytes).unwrap(); [INFO] [stdout] | ^^^^^^^ help: try: `&bytes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> backend/src/main.rs:270:54 [INFO] [stdout] | [INFO] [stdout] 270 | let links: Vec= serde_json::from_slice(&*bytes).unwrap(); [INFO] [stdout] | ^^^^^^^ help: try: `&bytes` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> backend/src/services/p2p.rs:175:9 [INFO] [stdout] | [INFO] [stdout] 175 | p2p_client.start().await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 175 | let _ = p2p_client.start().await; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 51s [INFO] running `Command { std: "docker" "inspect" "b9b6bb8416165fac6e3c211616aa936d929faea3f6cbd0fd87c92bbe0ada44bc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b9b6bb8416165fac6e3c211616aa936d929faea3f6cbd0fd87c92bbe0ada44bc", kill_on_drop: false }` [INFO] [stdout] b9b6bb8416165fac6e3c211616aa936d929faea3f6cbd0fd87c92bbe0ada44bc