[INFO] fetching crate jacquard-repo 0.9.6... [INFO] linting jacquard-repo-0.9.6 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate jacquard-repo 0.9.6 into /workspace/builds/worker-7-tc1/source [INFO] started tweaking crates.io crate jacquard-repo 0.9.6 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate jacquard-repo 0.9.6 [INFO] tweaked toml for crates.io crate jacquard-repo 0.9.6 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate jacquard-repo 0.9.6 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 crates.io crate jacquard-repo 0.9.6 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded match-lookup v0.1.1 [INFO] [stderr] Downloaded data-encoding-macro v0.1.18 [INFO] [stderr] Downloaded trait-variant v0.1.2 [INFO] [stderr] Downloaded cid v0.11.1 [INFO] [stderr] Downloaded serde_ipld_dagcbor v0.6.4 [INFO] [stderr] Downloaded data-encoding-macro-internal v0.1.16 [INFO] [stderr] Downloaded serde_ipld_dagjson v0.2.1 [INFO] [stderr] Downloaded ipld-core v0.4.2 [INFO] [stderr] Downloaded abnf-core v0.5.0 [INFO] [stderr] Downloaded iroh-car v0.5.1 [INFO] [stderr] Downloaded cbor4ii v0.2.14 [INFO] [stderr] Downloaded static-regular-grammar v2.0.2 [INFO] [stderr] Downloaded abnf v0.13.0 [INFO] [stderr] Downloaded cordyceps v0.3.4 [INFO] [stderr] Downloaded generator v0.8.7 [INFO] [stderr] Downloaded futures-buffered v0.2.12 [INFO] [stderr] Downloaded jacquard-lexicon v0.9.5 [INFO] [stderr] Downloaded n0-future v0.1.3 [INFO] [stderr] Downloaded langtag v0.4.0 [INFO] [stderr] Downloaded jacquard-common v0.9.5 [INFO] [stderr] Downloaded serde_html_form v0.2.8 [INFO] [stderr] Downloaded jacquard-derive v0.9.5 [INFO] [stderr] Downloaded smol_str v0.3.4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 4bb406ebdebc4aa961adbd5598de14bf867f9760c48274edf4e1c69ba5f1c56b [INFO] running `Command { std: "docker" "start" "-a" "4bb406ebdebc4aa961adbd5598de14bf867f9760c48274edf4e1c69ba5f1c56b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4bb406ebdebc4aa961adbd5598de14bf867f9760c48274edf4e1c69ba5f1c56b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4bb406ebdebc4aa961adbd5598de14bf867f9760c48274edf4e1c69ba5f1c56b", kill_on_drop: false }` [INFO] [stdout] 4bb406ebdebc4aa961adbd5598de14bf867f9760c48274edf4e1c69ba5f1c56b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 9ca77c21d583bf833d878cbefba0bf40a88d5a3126d65c171181b269f4979990 [INFO] running `Command { std: "docker" "start" "-a" "9ca77c21d583bf833d878cbefba0bf40a88d5a3126d65c171181b269f4979990", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.111 [INFO] [stderr] Compiling zeroize v1.8.2 [INFO] [stderr] Compiling subtle v2.6.1 [INFO] [stderr] Compiling const-oid v0.9.6 [INFO] [stderr] Compiling generic-array v0.14.9 [INFO] [stderr] Compiling libc v0.2.178 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Compiling typenum v1.19.0 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling cc v1.2.49 [INFO] [stderr] Compiling smallvec v1.15.1 [INFO] [stderr] Compiling stable_deref_trait v1.2.1 [INFO] [stderr] Compiling pin-project-lite v0.2.16 [INFO] [stderr] Compiling bytes v1.11.0 [INFO] [stderr] Compiling data-encoding v2.9.0 [INFO] [stderr] Compiling futures-core v0.3.31 [INFO] [stderr] Compiling slab v0.4.11 [INFO] [stderr] Compiling zerocopy v0.8.31 [INFO] [stderr] Compiling base64ct v1.8.1 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Compiling rustls v0.23.35 [INFO] [stderr] Compiling writeable v0.6.2 [INFO] [stderr] Compiling litemap v0.8.1 [INFO] [stderr] Compiling cpufeatures v0.2.17 [INFO] [stderr] Compiling percent-encoding v2.3.2 [INFO] [stderr] Compiling minimal-lexical v0.2.1 [INFO] [stderr] Compiling pin-utils v0.1.0 [INFO] [stderr] Compiling indexmap v2.12.1 [INFO] [stderr] Compiling cc-traits v2.0.0 [INFO] [stderr] Compiling tracing-core v0.1.35 [INFO] [stderr] Checking pem-rfc7468 v0.7.0 [INFO] [stderr] Compiling http v1.4.0 [INFO] [stderr] Compiling nom v7.1.3 [INFO] [stderr] Compiling rustls-pki-types v1.13.1 [INFO] [stderr] Checking der v0.7.10 [INFO] [stderr] Compiling heapless v0.7.17 [INFO] [stderr] Compiling proc-macro2-diagnostics v0.10.1 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Compiling untrusted v0.9.0 [INFO] [stderr] Compiling ciborium-io v0.2.2 [INFO] [stderr] Compiling base16ct v0.2.0 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Compiling futures-sink v0.3.31 [INFO] [stderr] Compiling mio v1.1.1 [INFO] [stderr] Compiling socket2 v0.6.1 [INFO] [stderr] Compiling futures-task v0.3.31 [INFO] [stderr] Compiling tracing v0.1.43 [INFO] [stderr] Compiling btree-slab v0.6.1 [INFO] [stderr] Compiling http-body v1.0.1 [INFO] [stderr] Compiling futures-util v0.3.31 [INFO] [stderr] Compiling sha2 v0.10.9 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling ff v0.13.1 [INFO] [stderr] Compiling crypto-bigint v0.5.5 [INFO] [stderr] Compiling icu_normalizer_data v2.1.1 [INFO] [stderr] Compiling icu_properties_data v2.1.1 [INFO] [stderr] Compiling try-lock v0.2.5 [INFO] [stderr] Compiling group v0.13.0 [INFO] [stderr] Compiling yansi v1.0.1 [INFO] [stderr] Compiling tokio v1.48.0 [INFO] [stderr] Compiling range-traits v0.3.2 [INFO] [stderr] Checking const-str v0.4.3 [INFO] [stderr] Compiling atomic-waker v1.1.2 [INFO] [stderr] Compiling simd-adler32 v0.3.8 [INFO] [stderr] Checking spki v0.7.3 [INFO] [stderr] Compiling tower-service v0.3.3 [INFO] [stderr] Checking pkcs8 v0.10.2 [INFO] [stderr] Compiling want v0.3.1 [INFO] [stderr] Compiling miniz_oxide v0.8.9 [INFO] [stderr] Compiling hmac v0.12.1 [INFO] [stderr] Compiling form_urlencoded v1.2.2 [INFO] [stderr] Compiling futures-channel v0.3.31 [INFO] [stderr] Compiling httparse v1.10.1 [INFO] [stderr] Compiling crc32fast v1.5.0 [INFO] [stderr] Compiling core2 v0.4.0 [INFO] [stderr] Compiling sec1 v0.7.3 [INFO] [stderr] Compiling abnf-core v0.5.0 [INFO] [stderr] Compiling abnf v0.13.0 [INFO] [stderr] Compiling base-x v0.2.11 [INFO] [stderr] Checking unsigned-varint v0.8.0 [INFO] [stderr] Compiling hex_fmt v0.3.0 [INFO] [stderr] Compiling indoc v2.0.7 [INFO] [stderr] Compiling flate2 v1.1.5 [INFO] [stderr] Compiling rfc6979 v0.4.0 [INFO] [stderr] Compiling signature v2.2.0 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Compiling getrandom v0.3.4 [INFO] [stderr] Compiling sync_wrapper v1.0.2 [INFO] [stderr] Checking serde_bytes v0.11.19 [INFO] [stderr] Compiling tower-layer v0.3.3 [INFO] [stderr] Compiling byteorder v1.5.0 [INFO] [stderr] Compiling utf8_iter v1.0.4 [INFO] [stderr] Compiling base64 v0.22.1 [INFO] [stderr] Compiling ipnet v2.11.0 [INFO] [stderr] Compiling compression-core v0.4.31 [INFO] [stderr] Compiling hash32 v0.2.1 [INFO] [stderr] Compiling rand_core v0.9.3 [INFO] [stderr] Compiling elliptic-curve v0.13.8 [INFO] [stderr] Compiling serde_json v1.0.145 [INFO] [stderr] Compiling spin v0.9.8 [INFO] [stderr] Compiling webpki-roots v1.0.4 [INFO] [stderr] Compiling compression-codecs v0.4.34 [INFO] [stderr] Compiling aho-corasick v1.1.4 [INFO] [stderr] Compiling bitflags v2.10.0 [INFO] [stderr] Compiling iri-string v0.7.9 [INFO] [stderr] Compiling regex-syntax v0.8.8 [INFO] [stderr] Compiling parking_lot_core v0.9.12 [INFO] [stderr] Compiling crossbeam-utils v0.8.21 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling ecdsa v0.16.9 [INFO] [stderr] Compiling primeorder v0.13.6 [INFO] [stderr] Compiling http-body-util v0.1.3 [INFO] [stderr] Compiling curve25519-dalek v4.1.3 [INFO] [stderr] Compiling encoding_rs v0.8.35 [INFO] [stderr] Compiling aliasable v0.1.3 [INFO] [stderr] Compiling mime v0.3.17 [INFO] [stderr] Compiling static_assertions v1.1.0 [INFO] [stderr] Compiling iana-time-zone v0.1.64 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Compiling p256 v0.13.2 [INFO] [stderr] Compiling k256 v0.13.4 [INFO] [stderr] Compiling match-lookup v0.1.1 [INFO] [stderr] Compiling chrono v0.4.42 [INFO] [stderr] Checking base256emoji v1.0.2 [INFO] [stderr] Compiling serde_html_form v0.2.8 [INFO] [stderr] Compiling smol_str v0.3.4 [INFO] [stderr] Compiling regex-automata v0.4.13 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling darling_core v0.21.3 [INFO] [stderr] Compiling prettyplease v0.2.37 [INFO] [stderr] Compiling hashbrown v0.14.5 [INFO] [stderr] Compiling n0-future v0.1.3 [INFO] [stderr] Checking rustls-webpki v0.103.8 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking ed25519 v2.2.3 [INFO] [stderr] Checking spin v0.10.0 [INFO] [stderr] Checking cordyceps v0.3.4 [INFO] [stderr] Checking diatomic-waker v0.2.3 [INFO] [stderr] Compiling inventory v0.3.21 [INFO] [stderr] Checking rand v0.9.2 [INFO] [stderr] Compiling dashmap v6.1.0 [INFO] [stderr] Checking futures-buffered v0.2.12 [INFO] [stderr] Compiling tokio-util v0.7.17 [INFO] [stderr] Compiling tower v0.5.2 [INFO] [stderr] Compiling async-compression v0.4.35 [INFO] [stderr] Checking unsigned-varint v0.7.2 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking tempfile v3.23.0 [INFO] [stderr] Compiling h2 v0.4.12 [INFO] [stderr] Compiling tower-http v0.6.8 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling regex v1.12.2 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling zerovec-derive v0.11.2 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling data-encoding-macro-internal v0.1.16 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling tokio-macros v2.6.0 [INFO] [stderr] Compiling zerocopy-derive v0.8.31 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Compiling miette-derive v7.6.0 [INFO] [stderr] Checking data-encoding-macro v0.1.18 [INFO] [stderr] Compiling multibase v0.9.2 [INFO] [stderr] Compiling ouroboros_macro v0.18.5 [INFO] [stderr] Compiling trait-variant v0.1.2 [INFO] [stderr] Compiling darling_macro v0.21.3 [INFO] [stderr] Compiling zerofrom v0.1.6 [INFO] [stderr] Compiling curve25519-dalek-derive v0.1.1 [INFO] [stderr] Compiling darling v0.21.3 [INFO] [stderr] Compiling serde_repr v0.1.20 [INFO] [stderr] Compiling bon-macros v3.8.1 [INFO] [stderr] Compiling serde_with_macros v3.16.1 [INFO] [stderr] Compiling yoke v0.8.1 [INFO] [stderr] Compiling zerovec v0.11.5 [INFO] [stderr] Compiling zerotrie v0.2.3 [INFO] [stderr] Compiling miette v7.6.0 [INFO] [stderr] Compiling thiserror v1.0.69 [INFO] [stderr] Compiling tinystr v0.8.2 [INFO] [stderr] Compiling potential_utf v0.1.4 [INFO] [stderr] Compiling ouroboros v0.18.5 [INFO] [stderr] Compiling icu_locale_core v2.1.1 [INFO] [stderr] Compiling icu_collections v2.1.1 [INFO] [stderr] Compiling thiserror v2.0.17 [INFO] [stderr] Compiling cobs v0.3.0 [INFO] [stderr] Compiling serde_with v3.16.1 [INFO] [stderr] Compiling derive_more-impl v1.0.0 [INFO] [stderr] Compiling hyper v1.8.1 [INFO] [stderr] Checking ed25519-dalek v2.2.0 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling icu_provider v2.1.1 [INFO] [stderr] Checking icu_normalizer v2.1.1 [INFO] [stderr] Checking icu_properties v2.1.1 [INFO] [stderr] Checking multihash v0.19.3 [INFO] [stderr] Checking cbor4ii v0.2.14 [INFO] [stderr] Compiling btree-range-map v0.7.2 [INFO] [stderr] Checking cid v0.11.1 [INFO] [stderr] Compiling serde_urlencoded v0.7.1 [INFO] [stderr] Checking ipld-core v0.4.2 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Compiling tokio-rustls v0.26.4 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking derive_more v1.0.0 [INFO] [stderr] Checking serde_ipld_dagcbor v0.6.4 [INFO] [stderr] Checking serde_ipld_dagjson v0.2.1 [INFO] [stderr] Compiling half v2.7.1 [INFO] [stderr] Compiling hyper-util v0.1.19 [INFO] [stderr] Compiling postcard v1.1.3 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Compiling ciborium-ll v0.2.2 [INFO] [stderr] Checking idna v1.1.0 [INFO] [stderr] Compiling ciborium v0.2.2 [INFO] [stderr] Checking url v2.5.7 [INFO] [stderr] Compiling bon v3.8.1 [INFO] [stderr] Compiling hyper-rustls v0.27.7 [INFO] [stderr] Checking iroh-car v0.5.1 [INFO] [stderr] Compiling reqwest v0.12.24 [INFO] [stderr] Compiling static-regular-grammar v2.0.2 [INFO] [stderr] Compiling langtag v0.4.0 [INFO] [stderr] Compiling jacquard-common v0.9.5 [INFO] [stderr] Compiling jacquard-lexicon v0.9.5 [INFO] [stderr] Compiling jacquard-derive v0.9.5 [INFO] [stderr] Checking jacquard-repo v0.9.6 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/car/reader.rs:35:53 [INFO] [stdout] | [INFO] [stdout] 35 | let reader = CarReader::new(file).await.map_err(|e| RepoError::car(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] note: the lint level is defined here [INFO] [stdout] --> src/lib.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | #![warn(clippy::all)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/car/reader.rs:42:42 [INFO] [stdout] | [INFO] [stdout] 42 | let (cid, data) = result.map_err(|e| RepoError::car_parse(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car_parse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/car/reader.rs:58:53 [INFO] [stdout] | [INFO] [stdout] 58 | let reader = CarReader::new(file).await.map_err(|e| RepoError::car(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/car/reader.rs:70:18 [INFO] [stdout] | [INFO] [stdout] 70 | .map_err(|e| RepoError::car_parse(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car_parse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/car/reader.rs:83:42 [INFO] [stdout] | [INFO] [stdout] 83 | let (cid, data) = result.map_err(|e| RepoError::car_parse(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car_parse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/car/reader.rs:99:53 [INFO] [stdout] | [INFO] [stdout] 99 | let reader = CarReader::new(file).await.map_err(|e| RepoError::car(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/car/reader.rs:111:13 [INFO] [stdout] | [INFO] [stdout] 111 | stream: Pin< [INFO] [stdout] | _____________^ [INFO] [stdout] 112 | | Box), iroh_car::Error>> + Send>, [INFO] [stdout] 113 | | >, [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/car/reader.rs:124:50 [INFO] [stdout] | [INFO] [stdout] 124 | let (cid, data) = result.map_err(|e| RepoError::car_parse(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car_parse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/car/writer.rs:106:44 [INFO] [stdout] | [INFO] [stdout] 106 | RepoError::not_found("commit", &commit_cid) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `commit_cid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/commit/firehose.rs:259:65 [INFO] [stdout] | [INFO] [stdout] 259 | .ok_or_else(|| RepoError::not_found("commit block", &commit_cid))?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `commit_cid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/commit/firehose.rs:356:65 [INFO] [stdout] | [INFO] [stdout] 356 | .ok_or_else(|| RepoError::not_found("commit block", &commit_cid))?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `commit_cid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/commit/firehose.rs:392:13 [INFO] [stdout] | [INFO] [stdout] 392 | / if let Ok(inverted) = new_mst.invert_op(op.clone()).await { [INFO] [stdout] 393 | | if !inverted { [INFO] [stdout] 394 | | return Err(RepoError::invalid_commit(format!( [INFO] [stdout] 395 | | "Invalid commit: op {:?} is not invertible", [INFO] [stdout] ... | [INFO] [stdout] 399 | | } [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)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 392 ~ if let Ok(inverted) = new_mst.invert_op(op.clone()).await [INFO] [stdout] 393 ~ && !inverted { [INFO] [stdout] 394 | return Err(RepoError::invalid_commit(format!( [INFO] [stdout] ... [INFO] [stdout] 397 | ))); [INFO] [stdout] 398 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `error::ProofError` [INFO] [stdout] --> src/commit/proof.rs:124:20 [INFO] [stdout] | [INFO] [stdout] 124 | return Err(ProofError::DidMismatch { [INFO] [stdout] | ____________________^ [INFO] [stdout] 125 | | commit_did: commit.did().to_string(), [INFO] [stdout] 126 | | expected_did: did.to_string(), [INFO] [stdout] 127 | | } [INFO] [stdout] 128 | | .into()); [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 124 ~ return Err(ProofError::DidMismatch { [INFO] [stdout] 125 + commit_did: commit.did().to_string(), [INFO] [stdout] 126 + expected_did: did.to_string(), [INFO] [stdout] 127 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `error::ProofError` [INFO] [stdout] --> src/commit/proof.rs:134:20 [INFO] [stdout] | [INFO] [stdout] 134 | return Err(ProofError::SignatureVerificationFailed { source: e }.into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `ProofError::SignatureVerificationFailed { source: e }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/commit/mod.rs:151:19 [INFO] [stdout] | [INFO] [stdout] 151 | data: self.data.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.data` [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)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Option>` which implements the `Copy` trait [INFO] [stdout] --> src/commit/mod.rs:153:19 [INFO] [stdout] | [INFO] [stdout] 153 | prev: self.prev.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.prev` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/mst/tree.rs:261:43 [INFO] [stdout] | [INFO] [stdout] 261 | pointer: Arc::new(RwLock::new(self.pointer.read().await.clone())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.pointer.read().await` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/mst/tree.rs:283:50 [INFO] [stdout] | [INFO] [stdout] 283 | RepoError::not_found("MST node", &pointer) [INFO] [stdout] | ^^^^^^^^ help: change this to: `pointer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:320:17 [INFO] [stdout] | [INFO] [stdout] 320 | / if let NodeEntry::Tree(mst) = entry { [INFO] [stdout] 321 | | if *mst.outdated_pointer.read().await { [INFO] [stdout] 322 | | let child = mst.clone(); [INFO] [stdout] 323 | | outdated_children.push(n0_future::task::spawn(async move { [INFO] [stdout] ... | [INFO] [stdout] 327 | | } [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] 320 ~ if let NodeEntry::Tree(mst) = entry [INFO] [stdout] 321 ~ && *mst.outdated_pointer.read().await { [INFO] [stdout] 322 | let child = mst.clone(); [INFO] [stdout] ... [INFO] [stdout] 325 | })); [INFO] [stdout] 326 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mst/tree.rs:334:30 [INFO] [stdout] | [INFO] [stdout] 334 | .map_err(|e| RepoError::task_failed(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::task_failed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:414:13 [INFO] [stdout] | [INFO] [stdout] 414 | / if let NodeEntry::Leaf { key: leaf_key, .. } = entry { [INFO] [stdout] 415 | | if leaf_key.as_str() >= key { [INFO] [stdout] 416 | | return i; [INFO] [stdout] 417 | | } [INFO] [stdout] 418 | | } [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] 414 ~ if let NodeEntry::Leaf { key: leaf_key, .. } = entry [INFO] [stdout] 415 ~ && leaf_key.as_str() >= key { [INFO] [stdout] 416 | return i; [INFO] [stdout] 417 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:436:13 [INFO] [stdout] | [INFO] [stdout] 436 | / if index < entries.len() { [INFO] [stdout] 437 | | if let NodeEntry::Leaf { [INFO] [stdout] 438 | | key: leaf_key, [INFO] [stdout] 439 | | value, [INFO] [stdout] ... | [INFO] [stdout] 446 | | } [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] 436 ~ if index < entries.len() [INFO] [stdout] 437 ~ && let NodeEntry::Leaf { [INFO] [stdout] 438 | key: leaf_key, [INFO] [stdout] ... [INFO] [stdout] 444 | } [INFO] [stdout] 445 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:437:17 [INFO] [stdout] | [INFO] [stdout] 437 | / if let NodeEntry::Leaf { [INFO] [stdout] 438 | | key: leaf_key, [INFO] [stdout] 439 | | value, [INFO] [stdout] 440 | | } = &entries[index] [INFO] [stdout] ... | [INFO] [stdout] 445 | | } [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] 440 ~ } = &entries[index] [INFO] [stdout] 441 ~ && leaf_key.as_str() == key { [INFO] [stdout] 442 | return Ok(Some(*value)); [INFO] [stdout] 443 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:449:13 [INFO] [stdout] | [INFO] [stdout] 449 | / if index > 0 { [INFO] [stdout] 450 | | if let NodeEntry::Tree(subtree) = &entries[index - 1] { [INFO] [stdout] 451 | | return subtree.get(key).await; [INFO] [stdout] 452 | | } [INFO] [stdout] 453 | | } [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] 449 ~ if index > 0 [INFO] [stdout] 450 ~ && let NodeEntry::Tree(subtree) = &entries[index - 1] { [INFO] [stdout] 451 | return subtree.get(key).await; [INFO] [stdout] 452 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:483:17 [INFO] [stdout] | [INFO] [stdout] 483 | / if index < entries.len() { [INFO] [stdout] 484 | | if let NodeEntry::Leaf { key: leaf_key, .. } = &entries[index] { [INFO] [stdout] 485 | | if leaf_key.as_str() == key { [INFO] [stdout] ... | [INFO] [stdout] 495 | | } [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] 483 ~ if index < entries.len() [INFO] [stdout] 484 ~ && let NodeEntry::Leaf { key: leaf_key, .. } = &entries[index] { [INFO] [stdout] 485 | if leaf_key.as_str() == key { [INFO] [stdout] ... [INFO] [stdout] 493 | } [INFO] [stdout] 494 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:484:21 [INFO] [stdout] | [INFO] [stdout] 484 | / if let NodeEntry::Leaf { key: leaf_key, .. } = &entries[index] { [INFO] [stdout] 485 | | if leaf_key.as_str() == key { [INFO] [stdout] 486 | | // Key exists - replace by just inserting at same position [INFO] [stdout] 487 | | let mut new_entries = entries.clone(); [INFO] [stdout] ... | [INFO] [stdout] 494 | | } [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] 484 ~ if let NodeEntry::Leaf { key: leaf_key, .. } = &entries[index] [INFO] [stdout] 485 ~ && leaf_key.as_str() == key { [INFO] [stdout] 486 | // Key exists - replace by just inserting at same position [INFO] [stdout] ... [INFO] [stdout] 492 | return self.new_tree(new_entries).await; [INFO] [stdout] 493 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:541:17 [INFO] [stdout] | [INFO] [stdout] 541 | / if index > 0 { [INFO] [stdout] 542 | | if let NodeEntry::Tree(prev_tree) = &entries[index - 1] { [INFO] [stdout] 543 | | // Prev is Tree - add to it [INFO] [stdout] 544 | | let new_subtree = prev_tree.add(key, cid).await?; [INFO] [stdout] ... | [INFO] [stdout] 549 | | } [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] 541 ~ if index > 0 [INFO] [stdout] 542 ~ && let NodeEntry::Tree(prev_tree) = &entries[index - 1] { [INFO] [stdout] 543 | // Prev is Tree - add to it [INFO] [stdout] ... [INFO] [stdout] 547 | .await; [INFO] [stdout] 548 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:647:13 [INFO] [stdout] | [INFO] [stdout] 647 | / if index < entries.len() { [INFO] [stdout] 648 | | if let NodeEntry::Leaf { key: leaf_key, .. } = &entries[index] { [INFO] [stdout] 649 | | if leaf_key.as_str() == key { [INFO] [stdout] ... | [INFO] [stdout] 679 | | } [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] 647 ~ if index < entries.len() [INFO] [stdout] 648 ~ && let NodeEntry::Leaf { key: leaf_key, .. } = &entries[index] { [INFO] [stdout] 649 | if leaf_key.as_str() == key { [INFO] [stdout] ... [INFO] [stdout] 677 | } [INFO] [stdout] 678 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:648:17 [INFO] [stdout] | [INFO] [stdout] 648 | / if let NodeEntry::Leaf { key: leaf_key, .. } = &entries[index] { [INFO] [stdout] 649 | | if leaf_key.as_str() == key { [INFO] [stdout] 650 | | // Found it - delete this entry [INFO] [stdout] 651 | | let prev = if index > 0 { [INFO] [stdout] ... | [INFO] [stdout] 678 | | } [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] 648 ~ if let NodeEntry::Leaf { key: leaf_key, .. } = &entries[index] [INFO] [stdout] 649 ~ && leaf_key.as_str() == key { [INFO] [stdout] 650 | // Found it - delete this entry [INFO] [stdout] ... [INFO] [stdout] 676 | return self.remove_entry(index).await; [INFO] [stdout] 677 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:682:13 [INFO] [stdout] | [INFO] [stdout] 682 | / if index > 0 { [INFO] [stdout] 683 | | if let NodeEntry::Tree(prev_tree) = &entries[index - 1] { [INFO] [stdout] 684 | | let subtree = prev_tree.delete_recurse(key).await?; [INFO] [stdout] 685 | | let subtree_entries = subtree.get_entries().await?; [INFO] [stdout] ... | [INFO] [stdout] 695 | | } [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] 682 ~ if index > 0 [INFO] [stdout] 683 ~ && let NodeEntry::Tree(prev_tree) = &entries[index - 1] { [INFO] [stdout] 684 | let subtree = prev_tree.delete_recurse(key).await?; [INFO] [stdout] ... [INFO] [stdout] 693 | } [INFO] [stdout] 694 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:761:13 [INFO] [stdout] | [INFO] [stdout] 761 | / if entries.len() == 1 { [INFO] [stdout] 762 | | if let NodeEntry::Tree(subtree) = &entries[0] { [INFO] [stdout] 763 | | return subtree.clone().trim_top().await; [INFO] [stdout] 764 | | } [INFO] [stdout] 765 | | } [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] 761 ~ if entries.len() == 1 [INFO] [stdout] 762 ~ && let NodeEntry::Tree(subtree) = &entries[0] { [INFO] [stdout] 763 | return subtree.clone().trim_top().await; [INFO] [stdout] 764 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mst/tree.rs:781:10 [INFO] [stdout] | [INFO] [stdout] 781 | ) -> Pin>, Option>)>> + Send + 'a>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mst/tree.rs:927:10 [INFO] [stdout] | [INFO] [stdout] 927 | ) -> Pin>> + Send + 'a>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mst/tree.rs:934:10 [INFO] [stdout] | [INFO] [stdout] 934 | ) -> Pin>> + Send + 'a>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mst/tree.rs:1095:10 [INFO] [stdout] | [INFO] [stdout] 1095 | ) -> Pin< [INFO] [stdout] | __________^ [INFO] [stdout] 1096 | | Box< [INFO] [stdout] 1097 | | dyn Future< [INFO] [stdout] 1098 | | Output = Result<(IpldCid, std::collections::BTreeMap)>, [INFO] [stdout] ... | [INFO] [stdout] 1101 | | >, [INFO] [stdout] 1102 | | > { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mst/tree.rs:1109:10 [INFO] [stdout] | [INFO] [stdout] 1109 | ) -> Pin< [INFO] [stdout] | __________^ [INFO] [stdout] 1110 | | Box< [INFO] [stdout] 1111 | | dyn Future< [INFO] [stdout] 1112 | | Output = Result<(IpldCid, std::collections::BTreeMap)>, [INFO] [stdout] ... | [INFO] [stdout] 1115 | | >, [INFO] [stdout] 1116 | | > { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:1219:13 [INFO] [stdout] | [INFO] [stdout] 1219 | / if let Some(NodeEntry::Leaf { [INFO] [stdout] 1220 | | key: leaf_key, [INFO] [stdout] 1221 | | value, [INFO] [stdout] 1222 | | }) = found [INFO] [stdout] ... | [INFO] [stdout] 1228 | | } [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] 1222 ~ }) = found [INFO] [stdout] 1223 ~ && leaf_key.as_str() == key { [INFO] [stdout] 1224 | cids.push(value); [INFO] [stdout] 1225 | return Ok(cids); [INFO] [stdout] 1226 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mst/tree.rs:1245:10 [INFO] [stdout] | [INFO] [stdout] 1245 | ) -> Pin> + Send + 'a>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/mst/tree.rs:1258:16 [INFO] [stdout] | [INFO] [stdout] 1258 | if outdated.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!outdated.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)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mst/tree.rs:1265:67 [INFO] [stdout] | [INFO] [stdout] 1265 | let bytes = serde_ipld_dagcbor::to_vec(&data).map_err(|e| RepoError::car(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are needlessly cloning iterator elements [INFO] [stdout] --> src/mst/tree.rs:1280:33 [INFO] [stdout] | [INFO] [stdout] 1280 | .nth(index as usize) [INFO] [stdout] | _________________________________^ [INFO] [stdout] 1281 | | .map(|entry| entry.clone())) [INFO] [stdout] | |_______________________________________^ help: remove the `map` call [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:1299:13 [INFO] [stdout] | [INFO] [stdout] 1299 | / if let Some(NodeEntry::Leaf { key: leaf_key, .. }) = found { [INFO] [stdout] 1300 | | if leaf_key.as_str() == key { [INFO] [stdout] 1301 | | return Ok(()); [INFO] [stdout] 1302 | | } [INFO] [stdout] 1303 | | } [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] 1299 ~ if let Some(NodeEntry::Leaf { key: leaf_key, .. }) = found [INFO] [stdout] 1300 ~ && leaf_key.as_str() == key { [INFO] [stdout] 1301 | return Ok(()); [INFO] [stdout] 1302 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mst/tree.rs:1339:30 [INFO] [stdout] | [INFO] [stdout] 1339 | .map_err(|e| RepoError::car(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/mst/tree.rs:1362:65 [INFO] [stdout] | [INFO] [stdout] 1362 | .ok_or_else(|| RepoError::not_found("MST node", &pointer))?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `pointer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mst/tree.rs:1367:26 [INFO] [stdout] | [INFO] [stdout] 1367 | .map_err(|e| RepoError::car(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mst/tree.rs:1433:6 [INFO] [stdout] | [INFO] [stdout] 1433 | ) -> Pin>> + Send>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mst/tree.rs:1478:6 [INFO] [stdout] | [INFO] [stdout] 1478 | ) -> Pin< [INFO] [stdout] | ______^ [INFO] [stdout] 1479 | | Box< [INFO] [stdout] 1480 | | dyn Future)>> [INFO] [stdout] 1481 | | + Send, [INFO] [stdout] 1482 | | >, [INFO] [stdout] 1483 | | > { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/mst/tree.rs:1568:40 [INFO] [stdout] | [INFO] [stdout] 1568 | format!("*({})", short_cid(&*cid_guard)) [INFO] [stdout] | ^^^^^^^^^^^ help: try: `&cid_guard` [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)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mst/tree.rs:1609:39 [INFO] [stdout] | [INFO] [stdout] 1609 | ... short_cid(&value) [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/mst/util.rs:93:5 [INFO] [stdout] | [INFO] [stdout] 93 | / return if split.len() == 2 && split[0].len() > 0 && split[1].len() > 0 { [INFO] [stdout] 94 | | Ok(()) [INFO] [stdout] 95 | | } else { [INFO] [stdout] 96 | | Err(MstError::InvalidKeyChars { [INFO] [stdout] ... | [INFO] [stdout] 99 | | .into()) [INFO] [stdout] 100 | | }; [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)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 93 ~ if split.len() == 2 && split[0].len() > 0 && split[1].len() > 0 { [INFO] [stdout] 94 + Ok(()) [INFO] [stdout] 95 + } else { [INFO] [stdout] 96 + Err(MstError::InvalidKeyChars { [INFO] [stdout] 97 + key: key.to_string(), [INFO] [stdout] 98 + } [INFO] [stdout] 99 + .into()) [INFO] [stdout] 100 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/mst/util.rs:93:35 [INFO] [stdout] | [INFO] [stdout] 93 | return if split.len() == 2 && split[0].len() > 0 && split[1].len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!split[0].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/mst/util.rs:93:57 [INFO] [stdout] | [INFO] [stdout] 93 | return if split.len() == 2 && split[0].len() > 0 && split[1].len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!split[1].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: accessing first element with `entries.get(0)` [INFO] [stdout] --> src/mst/util.rs:126:46 [INFO] [stdout] | [INFO] [stdout] 126 | if let Some(NodeEntry::Tree(tree)) = entries.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `entries.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/repo.rs:196:38 [INFO] [stdout] | [INFO] [stdout] 196 | ... .map_err(|e| RepoError::serialization(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::serialization` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/repo.rs:393:40 [INFO] [stdout] | [INFO] [stdout] 393 | leaf_blocks.insert(cid.clone(), Bytes::from(cbor)); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `cid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/repo.rs:418:21 [INFO] [stdout] | [INFO] [stdout] 418 | / if let Some(prev_cid) = prev { [INFO] [stdout] 419 | | if &cid != prev_cid { [INFO] [stdout] 420 | | return Err(RepoError::cid_mismatch(format!( [INFO] [stdout] 421 | | "Update prev CID mismatch for key {}: expected {}, got {}", [INFO] [stdout] ... | [INFO] [stdout] 425 | | } [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] 418 ~ if let Some(prev_cid) = prev [INFO] [stdout] 419 ~ && &cid != prev_cid { [INFO] [stdout] 420 | return Err(RepoError::cid_mismatch(format!( [INFO] [stdout] ... [INFO] [stdout] 423 | ))); [INFO] [stdout] 424 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/repo.rs:427:40 [INFO] [stdout] | [INFO] [stdout] 427 | leaf_blocks.insert(cid.clone(), Bytes::from(cbor)); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `cid` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/repo.rs:554:54 [INFO] [stdout] | [INFO] [stdout] 554 | RepoError::not_found("commit block", &commit_cid) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `commit_cid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> tests/mst_diff_suite.rs:472:9 [INFO] [stdout] | [INFO] [stdout] 472 | / match run_test_case(test_path, suite_root).await { [INFO] [stdout] 473 | | Ok(result) => { [INFO] [stdout] 474 | | if let Some(ref info) = result.inductive_proof_nodes_info { [INFO] [stdout] 475 | | if matches!(info.match_status, MatchStatus::Subset) { [INFO] [stdout] ... | [INFO] [stdout] 482 | | Err(_) => {} [INFO] [stdout] 483 | | } [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] 472 ~ if let Ok(result) = run_test_case(test_path, suite_root).await { [INFO] [stdout] 473 + if let Some(ref info) = result.inductive_proof_nodes_info { [INFO] [stdout] 474 + if matches!(info.match_status, MatchStatus::Subset) { [INFO] [stdout] 475 + let missing: Vec<_> = [INFO] [stdout] 476 + info.expected.difference(&info.actual).cloned().collect(); [INFO] [stdout] 477 + missing_block_cases.push((result.test_name, missing)); [INFO] [stdout] 478 + } [INFO] [stdout] 479 + } [INFO] [stdout] 480 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> tests/mst_diff_suite.rs:474:17 [INFO] [stdout] | [INFO] [stdout] 474 | / if let Some(ref info) = result.inductive_proof_nodes_info { [INFO] [stdout] 475 | | if matches!(info.match_status, MatchStatus::Subset) { [INFO] [stdout] 476 | | let missing: Vec<_> = [INFO] [stdout] 477 | | info.expected.difference(&info.actual).cloned().collect(); [INFO] [stdout] ... | [INFO] [stdout] 480 | | } [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] 474 ~ if let Some(ref info) = result.inductive_proof_nodes_info [INFO] [stdout] 475 ~ && matches!(info.match_status, MatchStatus::Subset) { [INFO] [stdout] 476 | let missing: Vec<_> = [INFO] [stdout] 477 | info.expected.difference(&info.actual).cloned().collect(); [INFO] [stdout] 478 | missing_block_cases.push((result.test_name, missing)); [INFO] [stdout] 479 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> tests/interop.rs:447:40 [INFO] [stdout] | [INFO] [stdout] 447 | let expected_creates: Vec<_> = added_keys.difference(&original_keys).map(|s| *s).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `copied` method: `added_keys.difference(&original_keys).copied()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are using an explicit closure for copying elements [INFO] [stdout] --> tests/interop.rs:450:40 [INFO] [stdout] | [INFO] [stdout] 450 | let expected_updates: Vec<_> = added_keys [INFO] [stdout] | ________________________________________^ [INFO] [stdout] 451 | | .intersection(&original_keys) [INFO] [stdout] 452 | | .map(|s| *s) [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] help: consider calling the dedicated `copied` method [INFO] [stdout] | [INFO] [stdout] 450 ~ let expected_updates: Vec<_> = added_keys [INFO] [stdout] 451 + .intersection(&original_keys).copied() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> tests/interop.rs:594:14 [INFO] [stdout] | [INFO] [stdout] 594 | .expect(&format!("Missing block after roundtrip: {}", cid)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("Missing block after roundtrip: {}", cid))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Cid<64>` which implements the `Copy` trait [INFO] [stdout] --> tests/large_proof_tests.rs:327:18 [INFO] [stdout] | [INFO] [stdout] 327 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `Cid<64>` which implements the `Copy` trait [INFO] [stdout] --> tests/large_proof_tests.rs:431:22 [INFO] [stdout] | [INFO] [stdout] 431 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 closure [INFO] [stdout] --> src/car/reader.rs:35:53 [INFO] [stdout] | [INFO] [stdout] 35 | let reader = CarReader::new(file).await.map_err(|e| RepoError::car(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] note: the lint level is defined here [INFO] [stdout] --> src/lib.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | #![warn(clippy::all)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/car/reader.rs:42:42 [INFO] [stdout] | [INFO] [stdout] 42 | let (cid, data) = result.map_err(|e| RepoError::car_parse(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car_parse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/car/reader.rs:58:53 [INFO] [stdout] | [INFO] [stdout] 58 | let reader = CarReader::new(file).await.map_err(|e| RepoError::car(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/car/reader.rs:70:18 [INFO] [stdout] | [INFO] [stdout] 70 | .map_err(|e| RepoError::car_parse(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car_parse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/car/reader.rs:83:42 [INFO] [stdout] | [INFO] [stdout] 83 | let (cid, data) = result.map_err(|e| RepoError::car_parse(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car_parse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/car/reader.rs:99:53 [INFO] [stdout] | [INFO] [stdout] 99 | let reader = CarReader::new(file).await.map_err(|e| RepoError::car(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/car/reader.rs:111:13 [INFO] [stdout] | [INFO] [stdout] 111 | stream: Pin< [INFO] [stdout] | _____________^ [INFO] [stdout] 112 | | Box), iroh_car::Error>> + Send>, [INFO] [stdout] 113 | | >, [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/car/reader.rs:124:50 [INFO] [stdout] | [INFO] [stdout] 124 | let (cid, data) = result.map_err(|e| RepoError::car_parse(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car_parse` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/car/reader.rs:163:35 [INFO] [stdout] | [INFO] [stdout] 163 | let hash = Sha256::digest(&[value]); [INFO] [stdout] | ^^^^^^^^ help: change this to: `[value]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/car/writer.rs:106:44 [INFO] [stdout] | [INFO] [stdout] 106 | RepoError::not_found("commit", &commit_cid) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `commit_cid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/car/writer.rs:140:35 [INFO] [stdout] | [INFO] [stdout] 140 | let hash = Sha256::digest(&[value]); [INFO] [stdout] | ^^^^^^^^ help: change this to: `[value]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/commit/firehose.rs:259:65 [INFO] [stdout] | [INFO] [stdout] 259 | .ok_or_else(|| RepoError::not_found("commit block", &commit_cid))?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `commit_cid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/commit/firehose.rs:356:65 [INFO] [stdout] | [INFO] [stdout] 356 | .ok_or_else(|| RepoError::not_found("commit block", &commit_cid))?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `commit_cid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/commit/firehose.rs:392:13 [INFO] [stdout] | [INFO] [stdout] 392 | / if let Ok(inverted) = new_mst.invert_op(op.clone()).await { [INFO] [stdout] 393 | | if !inverted { [INFO] [stdout] 394 | | return Err(RepoError::invalid_commit(format!( [INFO] [stdout] 395 | | "Invalid commit: op {:?} is not invertible", [INFO] [stdout] ... | [INFO] [stdout] 399 | | } [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)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 392 ~ if let Ok(inverted) = new_mst.invert_op(op.clone()).await [INFO] [stdout] 393 ~ && !inverted { [INFO] [stdout] 394 | return Err(RepoError::invalid_commit(format!( [INFO] [stdout] ... [INFO] [stdout] 397 | ))); [INFO] [stdout] 398 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/commit/firehose.rs:497:22 [INFO] [stdout] | [INFO] [stdout] 497 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/commit/firehose.rs:548:22 [INFO] [stdout] | [INFO] [stdout] 548 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/commit/firehose.rs:604:22 [INFO] [stdout] | [INFO] [stdout] 604 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/commit/firehose.rs:650:22 [INFO] [stdout] | [INFO] [stdout] 650 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/commit/firehose.rs:677:22 [INFO] [stdout] | [INFO] [stdout] 677 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/commit/firehose.rs:715:22 [INFO] [stdout] | [INFO] [stdout] 715 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/commit/firehose.rs:778:22 [INFO] [stdout] | [INFO] [stdout] 778 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/commit/firehose.rs:832:22 [INFO] [stdout] | [INFO] [stdout] 832 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/commit/firehose.rs:894:22 [INFO] [stdout] | [INFO] [stdout] 894 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/commit/firehose.rs:944:22 [INFO] [stdout] | [INFO] [stdout] 944 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/commit/firehose.rs:982:22 [INFO] [stdout] | [INFO] [stdout] 982 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/commit/firehose.rs:1029:22 [INFO] [stdout] | [INFO] [stdout] 1029 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 conversion to the same type: `error::ProofError` [INFO] [stdout] --> src/commit/proof.rs:124:20 [INFO] [stdout] | [INFO] [stdout] 124 | return Err(ProofError::DidMismatch { [INFO] [stdout] | ____________________^ [INFO] [stdout] 125 | | commit_did: commit.did().to_string(), [INFO] [stdout] 126 | | expected_did: did.to_string(), [INFO] [stdout] 127 | | } [INFO] [stdout] 128 | | .into()); [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 124 ~ return Err(ProofError::DidMismatch { [INFO] [stdout] 125 + commit_did: commit.did().to_string(), [INFO] [stdout] 126 + expected_did: did.to_string(), [INFO] [stdout] 127 ~ }); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `error::ProofError` [INFO] [stdout] --> src/commit/proof.rs:134:20 [INFO] [stdout] | [INFO] [stdout] 134 | return Err(ProofError::SignatureVerificationFailed { source: e }.into()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `ProofError::SignatureVerificationFailed { source: e }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/commit/mod.rs:151:19 [INFO] [stdout] | [INFO] [stdout] 151 | data: self.data.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.data` [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 `Option>` which implements the `Copy` trait [INFO] [stdout] --> src/commit/mod.rs:153:19 [INFO] [stdout] | [INFO] [stdout] 153 | prev: self.prev.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.prev` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/mst/tree.rs:261:43 [INFO] [stdout] | [INFO] [stdout] 261 | pointer: Arc::new(RwLock::new(self.pointer.read().await.clone())), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*self.pointer.read().await` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/mst/tree.rs:283:50 [INFO] [stdout] | [INFO] [stdout] 283 | RepoError::not_found("MST node", &pointer) [INFO] [stdout] | ^^^^^^^^ help: change this to: `pointer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:320:17 [INFO] [stdout] | [INFO] [stdout] 320 | / if let NodeEntry::Tree(mst) = entry { [INFO] [stdout] 321 | | if *mst.outdated_pointer.read().await { [INFO] [stdout] 322 | | let child = mst.clone(); [INFO] [stdout] 323 | | outdated_children.push(n0_future::task::spawn(async move { [INFO] [stdout] ... | [INFO] [stdout] 327 | | } [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] 320 ~ if let NodeEntry::Tree(mst) = entry [INFO] [stdout] 321 ~ && *mst.outdated_pointer.read().await { [INFO] [stdout] 322 | let child = mst.clone(); [INFO] [stdout] ... [INFO] [stdout] 325 | })); [INFO] [stdout] 326 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mst/tree.rs:334:30 [INFO] [stdout] | [INFO] [stdout] 334 | .map_err(|e| RepoError::task_failed(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::task_failed` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:414:13 [INFO] [stdout] | [INFO] [stdout] 414 | / if let NodeEntry::Leaf { key: leaf_key, .. } = entry { [INFO] [stdout] 415 | | if leaf_key.as_str() >= key { [INFO] [stdout] 416 | | return i; [INFO] [stdout] 417 | | } [INFO] [stdout] 418 | | } [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] 414 ~ if let NodeEntry::Leaf { key: leaf_key, .. } = entry [INFO] [stdout] 415 ~ && leaf_key.as_str() >= key { [INFO] [stdout] 416 | return i; [INFO] [stdout] 417 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:436:13 [INFO] [stdout] | [INFO] [stdout] 436 | / if index < entries.len() { [INFO] [stdout] 437 | | if let NodeEntry::Leaf { [INFO] [stdout] 438 | | key: leaf_key, [INFO] [stdout] 439 | | value, [INFO] [stdout] ... | [INFO] [stdout] 446 | | } [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] 436 ~ if index < entries.len() [INFO] [stdout] 437 ~ && let NodeEntry::Leaf { [INFO] [stdout] 438 | key: leaf_key, [INFO] [stdout] ... [INFO] [stdout] 444 | } [INFO] [stdout] 445 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:437:17 [INFO] [stdout] | [INFO] [stdout] 437 | / if let NodeEntry::Leaf { [INFO] [stdout] 438 | | key: leaf_key, [INFO] [stdout] 439 | | value, [INFO] [stdout] 440 | | } = &entries[index] [INFO] [stdout] ... | [INFO] [stdout] 445 | | } [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] 440 ~ } = &entries[index] [INFO] [stdout] 441 ~ && leaf_key.as_str() == key { [INFO] [stdout] 442 | return Ok(Some(*value)); [INFO] [stdout] 443 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:449:13 [INFO] [stdout] | [INFO] [stdout] 449 | / if index > 0 { [INFO] [stdout] 450 | | if let NodeEntry::Tree(subtree) = &entries[index - 1] { [INFO] [stdout] 451 | | return subtree.get(key).await; [INFO] [stdout] 452 | | } [INFO] [stdout] 453 | | } [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] 449 ~ if index > 0 [INFO] [stdout] 450 ~ && let NodeEntry::Tree(subtree) = &entries[index - 1] { [INFO] [stdout] 451 | return subtree.get(key).await; [INFO] [stdout] 452 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:483:17 [INFO] [stdout] | [INFO] [stdout] 483 | / if index < entries.len() { [INFO] [stdout] 484 | | if let NodeEntry::Leaf { key: leaf_key, .. } = &entries[index] { [INFO] [stdout] 485 | | if leaf_key.as_str() == key { [INFO] [stdout] ... | [INFO] [stdout] 495 | | } [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] 483 ~ if index < entries.len() [INFO] [stdout] 484 ~ && let NodeEntry::Leaf { key: leaf_key, .. } = &entries[index] { [INFO] [stdout] 485 | if leaf_key.as_str() == key { [INFO] [stdout] ... [INFO] [stdout] 493 | } [INFO] [stdout] 494 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:484:21 [INFO] [stdout] | [INFO] [stdout] 484 | / if let NodeEntry::Leaf { key: leaf_key, .. } = &entries[index] { [INFO] [stdout] 485 | | if leaf_key.as_str() == key { [INFO] [stdout] 486 | | // Key exists - replace by just inserting at same position [INFO] [stdout] 487 | | let mut new_entries = entries.clone(); [INFO] [stdout] ... | [INFO] [stdout] 494 | | } [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] 484 ~ if let NodeEntry::Leaf { key: leaf_key, .. } = &entries[index] [INFO] [stdout] 485 ~ && leaf_key.as_str() == key { [INFO] [stdout] 486 | // Key exists - replace by just inserting at same position [INFO] [stdout] ... [INFO] [stdout] 492 | return self.new_tree(new_entries).await; [INFO] [stdout] 493 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:541:17 [INFO] [stdout] | [INFO] [stdout] 541 | / if index > 0 { [INFO] [stdout] 542 | | if let NodeEntry::Tree(prev_tree) = &entries[index - 1] { [INFO] [stdout] 543 | | // Prev is Tree - add to it [INFO] [stdout] 544 | | let new_subtree = prev_tree.add(key, cid).await?; [INFO] [stdout] ... | [INFO] [stdout] 549 | | } [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] 541 ~ if index > 0 [INFO] [stdout] 542 ~ && let NodeEntry::Tree(prev_tree) = &entries[index - 1] { [INFO] [stdout] 543 | // Prev is Tree - add to it [INFO] [stdout] ... [INFO] [stdout] 547 | .await; [INFO] [stdout] 548 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:647:13 [INFO] [stdout] | [INFO] [stdout] 647 | / if index < entries.len() { [INFO] [stdout] 648 | | if let NodeEntry::Leaf { key: leaf_key, .. } = &entries[index] { [INFO] [stdout] 649 | | if leaf_key.as_str() == key { [INFO] [stdout] ... | [INFO] [stdout] 679 | | } [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] 647 ~ if index < entries.len() [INFO] [stdout] 648 ~ && let NodeEntry::Leaf { key: leaf_key, .. } = &entries[index] { [INFO] [stdout] 649 | if leaf_key.as_str() == key { [INFO] [stdout] ... [INFO] [stdout] 677 | } [INFO] [stdout] 678 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:648:17 [INFO] [stdout] | [INFO] [stdout] 648 | / if let NodeEntry::Leaf { key: leaf_key, .. } = &entries[index] { [INFO] [stdout] 649 | | if leaf_key.as_str() == key { [INFO] [stdout] 650 | | // Found it - delete this entry [INFO] [stdout] 651 | | let prev = if index > 0 { [INFO] [stdout] ... | [INFO] [stdout] 678 | | } [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] 648 ~ if let NodeEntry::Leaf { key: leaf_key, .. } = &entries[index] [INFO] [stdout] 649 ~ && leaf_key.as_str() == key { [INFO] [stdout] 650 | // Found it - delete this entry [INFO] [stdout] ... [INFO] [stdout] 676 | return self.remove_entry(index).await; [INFO] [stdout] 677 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:682:13 [INFO] [stdout] | [INFO] [stdout] 682 | / if index > 0 { [INFO] [stdout] 683 | | if let NodeEntry::Tree(prev_tree) = &entries[index - 1] { [INFO] [stdout] 684 | | let subtree = prev_tree.delete_recurse(key).await?; [INFO] [stdout] 685 | | let subtree_entries = subtree.get_entries().await?; [INFO] [stdout] ... | [INFO] [stdout] 695 | | } [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] 682 ~ if index > 0 [INFO] [stdout] 683 ~ && let NodeEntry::Tree(prev_tree) = &entries[index - 1] { [INFO] [stdout] 684 | let subtree = prev_tree.delete_recurse(key).await?; [INFO] [stdout] ... [INFO] [stdout] 693 | } [INFO] [stdout] 694 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:761:13 [INFO] [stdout] | [INFO] [stdout] 761 | / if entries.len() == 1 { [INFO] [stdout] 762 | | if let NodeEntry::Tree(subtree) = &entries[0] { [INFO] [stdout] 763 | | return subtree.clone().trim_top().await; [INFO] [stdout] 764 | | } [INFO] [stdout] 765 | | } [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] 761 ~ if entries.len() == 1 [INFO] [stdout] 762 ~ && let NodeEntry::Tree(subtree) = &entries[0] { [INFO] [stdout] 763 | return subtree.clone().trim_top().await; [INFO] [stdout] 764 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mst/tree.rs:781:10 [INFO] [stdout] | [INFO] [stdout] 781 | ) -> Pin>, Option>)>> + Send + 'a>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mst/tree.rs:927:10 [INFO] [stdout] | [INFO] [stdout] 927 | ) -> Pin>> + Send + 'a>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mst/tree.rs:934:10 [INFO] [stdout] | [INFO] [stdout] 934 | ) -> Pin>> + Send + 'a>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mst/tree.rs:1095:10 [INFO] [stdout] | [INFO] [stdout] 1095 | ) -> Pin< [INFO] [stdout] | __________^ [INFO] [stdout] 1096 | | Box< [INFO] [stdout] 1097 | | dyn Future< [INFO] [stdout] 1098 | | Output = Result<(IpldCid, std::collections::BTreeMap)>, [INFO] [stdout] ... | [INFO] [stdout] 1101 | | >, [INFO] [stdout] 1102 | | > { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mst/tree.rs:1109:10 [INFO] [stdout] | [INFO] [stdout] 1109 | ) -> Pin< [INFO] [stdout] | __________^ [INFO] [stdout] 1110 | | Box< [INFO] [stdout] 1111 | | dyn Future< [INFO] [stdout] 1112 | | Output = Result<(IpldCid, std::collections::BTreeMap)>, [INFO] [stdout] ... | [INFO] [stdout] 1115 | | >, [INFO] [stdout] 1116 | | > { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:1219:13 [INFO] [stdout] | [INFO] [stdout] 1219 | / if let Some(NodeEntry::Leaf { [INFO] [stdout] 1220 | | key: leaf_key, [INFO] [stdout] 1221 | | value, [INFO] [stdout] 1222 | | }) = found [INFO] [stdout] ... | [INFO] [stdout] 1228 | | } [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] 1222 ~ }) = found [INFO] [stdout] 1223 ~ && leaf_key.as_str() == key { [INFO] [stdout] 1224 | cids.push(value); [INFO] [stdout] 1225 | return Ok(cids); [INFO] [stdout] 1226 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mst/tree.rs:1245:10 [INFO] [stdout] | [INFO] [stdout] 1245 | ) -> Pin> + Send + 'a>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/mst/tree.rs:1258:16 [INFO] [stdout] | [INFO] [stdout] 1258 | if outdated.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!outdated.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)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mst/tree.rs:1265:67 [INFO] [stdout] | [INFO] [stdout] 1265 | let bytes = serde_ipld_dagcbor::to_vec(&data).map_err(|e| RepoError::car(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are needlessly cloning iterator elements [INFO] [stdout] --> src/mst/tree.rs:1280:33 [INFO] [stdout] | [INFO] [stdout] 1280 | .nth(index as usize) [INFO] [stdout] | _________________________________^ [INFO] [stdout] 1281 | | .map(|entry| entry.clone())) [INFO] [stdout] | |_______________________________________^ help: remove the `map` call [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/mst/tree.rs:1299:13 [INFO] [stdout] | [INFO] [stdout] 1299 | / if let Some(NodeEntry::Leaf { key: leaf_key, .. }) = found { [INFO] [stdout] 1300 | | if leaf_key.as_str() == key { [INFO] [stdout] 1301 | | return Ok(()); [INFO] [stdout] 1302 | | } [INFO] [stdout] 1303 | | } [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] 1299 ~ if let Some(NodeEntry::Leaf { key: leaf_key, .. }) = found [INFO] [stdout] 1300 ~ && leaf_key.as_str() == key { [INFO] [stdout] 1301 | return Ok(()); [INFO] [stdout] 1302 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mst/tree.rs:1339:30 [INFO] [stdout] | [INFO] [stdout] 1339 | .map_err(|e| RepoError::car(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/mst/tree.rs:1362:65 [INFO] [stdout] | [INFO] [stdout] 1362 | .ok_or_else(|| RepoError::not_found("MST node", &pointer))?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `pointer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/mst/tree.rs:1367:26 [INFO] [stdout] | [INFO] [stdout] 1367 | .map_err(|e| RepoError::car(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::car` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mst/tree.rs:1433:6 [INFO] [stdout] | [INFO] [stdout] 1433 | ) -> Pin>> + Send>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/mst/tree.rs:1478:6 [INFO] [stdout] | [INFO] [stdout] 1478 | ) -> Pin< [INFO] [stdout] | ______^ [INFO] [stdout] 1479 | | Box< [INFO] [stdout] 1480 | | dyn Future)>> [INFO] [stdout] 1481 | | + Send, [INFO] [stdout] 1482 | | >, [INFO] [stdout] 1483 | | > { [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/mst/tree.rs:1568:40 [INFO] [stdout] | [INFO] [stdout] 1568 | format!("*({})", short_cid(&*cid_guard)) [INFO] [stdout] | ^^^^^^^^^^^ help: try: `&cid_guard` [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)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/mst/tree.rs:1609:39 [INFO] [stdout] | [INFO] [stdout] 1609 | ... short_cid(&value) [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/mst/tree.rs:1702:30 [INFO] [stdout] | [INFO] [stdout] 1702 | let result = mst.add(&"".to_string(), cid1).await; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: use: `""` [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)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/mst/tree.rs:1706:30 [INFO] [stdout] | [INFO] [stdout] 1706 | let result = mst.add(&"asdf".to_string(), cid1).await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `"asdf"` [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] --> src/mst/tree.rs:1710:30 [INFO] [stdout] | [INFO] [stdout] 1710 | let result = mst.add(&"nested/collection/asdf".to_string(), cid1).await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"nested/collection/asdf"` [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] --> src/mst/tree.rs:1714:30 [INFO] [stdout] | [INFO] [stdout] 1714 | let result = mst.add(&"coll/".to_string(), cid1).await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `"coll/"` [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] --> src/mst/tree.rs:1716:30 [INFO] [stdout] | [INFO] [stdout] 1716 | let result = mst.add(&"/rkey".to_string(), cid1).await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `"/rkey"` [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] --> src/mst/tree.rs:1720:30 [INFO] [stdout] | [INFO] [stdout] 1720 | let result = mst.add(&"coll/jalapeñoA".to_string(), cid1).await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"coll/jalapeñoA"` [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] --> src/mst/tree.rs:1722:30 [INFO] [stdout] | [INFO] [stdout] 1722 | let result = mst.add(&"coll/coöperative".to_string(), cid1).await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"coll/coöperative"` [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] --> src/mst/tree.rs:1724:30 [INFO] [stdout] | [INFO] [stdout] 1724 | let result = mst.add(&"coll/abc💩".to_string(), cid1).await; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"coll/abc💩"` [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] --> src/mst/tree.rs:1756:34 [INFO] [stdout] | [INFO] [stdout] 1756 | let result = mst.add(&key.to_string(), cid1).await; [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: length comparison to one [INFO] [stdout] --> src/mst/tree.rs:2134:17 [INFO] [stdout] | [INFO] [stdout] 2134 | assert!(cids.len() >= 1, "Should have at least the root CID"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cids.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to one [INFO] [stdout] --> src/mst/tree.rs:2211:17 [INFO] [stdout] | [INFO] [stdout] 2211 | assert!(cids.len() >= 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cids.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: unneeded `return` statement [INFO] [stdout] --> src/mst/util.rs:93:5 [INFO] [stdout] | [INFO] [stdout] 93 | / return if split.len() == 2 && split[0].len() > 0 && split[1].len() > 0 { [INFO] [stdout] 94 | | Ok(()) [INFO] [stdout] 95 | | } else { [INFO] [stdout] 96 | | Err(MstError::InvalidKeyChars { [INFO] [stdout] ... | [INFO] [stdout] 99 | | .into()) [INFO] [stdout] 100 | | }; [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)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 93 ~ if split.len() == 2 && split[0].len() > 0 && split[1].len() > 0 { [INFO] [stdout] 94 + Ok(()) [INFO] [stdout] 95 + } else { [INFO] [stdout] 96 + Err(MstError::InvalidKeyChars { [INFO] [stdout] 97 + key: key.to_string(), [INFO] [stdout] 98 + } [INFO] [stdout] 99 + .into()) [INFO] [stdout] 100 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/mst/util.rs:93:35 [INFO] [stdout] | [INFO] [stdout] 93 | return if split.len() == 2 && split[0].len() > 0 && split[1].len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!split[0].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/mst/util.rs:93:57 [INFO] [stdout] | [INFO] [stdout] 93 | return if split.len() == 2 && split[0].len() > 0 && split[1].len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!split[1].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: accessing first element with `entries.get(0)` [INFO] [stdout] --> src/mst/util.rs:126:46 [INFO] [stdout] | [INFO] [stdout] 126 | if let Some(NodeEntry::Tree(tree)) = entries.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `entries.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/mst/diff.rs:682:37 [INFO] [stdout] | [INFO] [stdout] 682 | .push((SmolStr::new(&format!("key{}", i)), test_cid(1))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `format!("key{}", i)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/repo.rs:196:38 [INFO] [stdout] | [INFO] [stdout] 196 | ... .map_err(|e| RepoError::serialization(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `RepoError::serialization` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/repo.rs:393:40 [INFO] [stdout] | [INFO] [stdout] 393 | leaf_blocks.insert(cid.clone(), Bytes::from(cbor)); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `cid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/repo.rs:418:21 [INFO] [stdout] | [INFO] [stdout] 418 | / if let Some(prev_cid) = prev { [INFO] [stdout] 419 | | if &cid != prev_cid { [INFO] [stdout] 420 | | return Err(RepoError::cid_mismatch(format!( [INFO] [stdout] 421 | | "Update prev CID mismatch for key {}: expected {}, got {}", [INFO] [stdout] ... | [INFO] [stdout] 425 | | } [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] 418 ~ if let Some(prev_cid) = prev [INFO] [stdout] 419 ~ && &cid != prev_cid { [INFO] [stdout] 420 | return Err(RepoError::cid_mismatch(format!( [INFO] [stdout] ... [INFO] [stdout] 423 | ))); [INFO] [stdout] 424 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/repo.rs:427:40 [INFO] [stdout] | [INFO] [stdout] 427 | leaf_blocks.insert(cid.clone(), Bytes::from(cbor)); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `cid` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/repo.rs:554:54 [INFO] [stdout] | [INFO] [stdout] 554 | RepoError::not_found("commit block", &commit_cid) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `commit_cid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/repo.rs:656:35 [INFO] [stdout] | [INFO] [stdout] 656 | let hash = Sha256::digest(&[value]); [INFO] [stdout] | ^^^^^^^^ help: change this to: `[value]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/repo.rs:718:22 [INFO] [stdout] | [INFO] [stdout] 718 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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: the loop variable `i` is used to index `records` [INFO] [stdout] --> src/repo.rs:921:18 [INFO] [stdout] | [INFO] [stdout] 921 | for i in 0..20 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 921 - for i in 0..20 { [INFO] [stdout] 921 + for (i, ) in records.iter().enumerate().take(20) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `records` [INFO] [stdout] --> src/repo.rs:933:18 [INFO] [stdout] | [INFO] [stdout] 933 | for i in 80..100 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 933 - for i in 80..100 { [INFO] [stdout] 933 + for in records.iter().take(100).skip(80) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/repo.rs:995:32 [INFO] [stdout] | [INFO] [stdout] 995 | .commit(&did, Some(repo.current_commit_cid().clone()), &signing_key) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/repo.rs:1048:22 [INFO] [stdout] | [INFO] [stdout] 1048 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/repo.rs:1069:22 [INFO] [stdout] | [INFO] [stdout] 1069 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/repo.rs:1112:22 [INFO] [stdout] | [INFO] [stdout] 1112 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/repo.rs:1193:22 [INFO] [stdout] | [INFO] [stdout] 1193 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `CidGeneric<64>` which implements the `Copy` trait [INFO] [stdout] --> src/repo.rs:1229:22 [INFO] [stdout] | [INFO] [stdout] 1229 | Some(repo.current_commit_cid().clone()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*repo.current_commit_cid()` [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 `vec!` [INFO] [stdout] --> src/mst/tree.rs:2153:20 [INFO] [stdout] | [INFO] [stdout] 2153 | let keys = vec![ [INFO] [stdout] | ____________________^ [INFO] [stdout] 2154 | | "app.bsky.feed.post/3l4qpz7ajrc2a", [INFO] [stdout] 2155 | | "app.bsky.feed.post/3l4qpz7bjrc2b", [INFO] [stdout] 2156 | | "app.bsky.feed.like/3l4qpz7cjrc2c", [INFO] [stdout] 2157 | | "app.bsky.feed.like/3l4qpz7djrc2d", [INFO] [stdout] 2158 | | "app.bsky.graph.follow/3l4qpz7ejrc2e", [INFO] [stdout] 2159 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` implied by `#[warn(clippy::all)]` [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 2153 ~ let keys = ["app.bsky.feed.post/3l4qpz7ajrc2a", [INFO] [stdout] 2154 + "app.bsky.feed.post/3l4qpz7bjrc2b", [INFO] [stdout] 2155 + "app.bsky.feed.like/3l4qpz7cjrc2c", [INFO] [stdout] 2156 + "app.bsky.feed.like/3l4qpz7djrc2d", [INFO] [stdout] 2157 ~ "app.bsky.graph.follow/3l4qpz7ejrc2e"]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/mst/tree.rs:2188:29 [INFO] [stdout] | [INFO] [stdout] 2188 | let existing_keys = vec![ [INFO] [stdout] | _____________________________^ [INFO] [stdout] 2189 | | "com.example.posts/key1", [INFO] [stdout] 2190 | | "com.example.posts/key2", [INFO] [stdout] 2191 | | "com.example.posts/key4", [INFO] [stdout] 2192 | | "com.example.posts/key5", [INFO] [stdout] 2193 | | ]; [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] help: you can use an array directly [INFO] [stdout] | [INFO] [stdout] 2188 ~ let existing_keys = ["com.example.posts/key1", [INFO] [stdout] 2189 + "com.example.posts/key2", [INFO] [stdout] 2190 + "com.example.posts/key4", [INFO] [stdout] 2191 ~ "com.example.posts/key5"]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 06s [INFO] running `Command { std: "docker" "inspect" "9ca77c21d583bf833d878cbefba0bf40a88d5a3126d65c171181b269f4979990", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9ca77c21d583bf833d878cbefba0bf40a88d5a3126d65c171181b269f4979990", kill_on_drop: false }` [INFO] [stdout] 9ca77c21d583bf833d878cbefba0bf40a88d5a3126d65c171181b269f4979990