[INFO] cloning repository https://github.com/pedrocr/syncer [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/pedrocr/syncer" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpedrocr%2Fsyncer", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpedrocr%2Fsyncer'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 3438f98685638f3b21235e279c26d446a392cd26 [INFO] linting pedrocr/syncer against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fpedrocr%2Fsyncer" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/pedrocr/syncer [INFO] finished tweaking git repo https://github.com/pedrocr/syncer [INFO] tweaked toml for git repo https://github.com/pedrocr/syncer written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/pedrocr/syncer on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/pedrocr/syncer already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded linked-hash-map v0.5.2 [INFO] [stderr] Downloaded proc-macro2 v1.0.9 [INFO] [stderr] Downloaded users v0.9.1 [INFO] [stderr] Downloaded thread-scoped v1.0.2 [INFO] [stderr] Downloaded bincode v1.2.1 [INFO] [stderr] Downloaded byte-tools v0.2.0 [INFO] [stderr] Downloaded crypto-mac v0.5.2 [INFO] [stderr] Downloaded generic-array v0.9.0 [INFO] [stderr] Downloaded crossbeam-utils v0.5.0 [INFO] [stderr] Downloaded fuse_mt v0.4.4 [INFO] [stderr] Downloaded serde_derive v1.0.104 [INFO] [stderr] Downloaded blake2 v0.7.1 [INFO] [stderr] Downloaded serde v1.0.104 [INFO] [stderr] Downloaded fuse v0.3.1 [INFO] [stderr] Downloaded num_cpus v1.12.0 [INFO] [stderr] Downloaded digest v0.7.6 [INFO] [stderr] Downloaded hex v0.3.2 [INFO] [stderr] Downloaded syn v1.0.16 [INFO] [stderr] Downloaded rusqlite v0.14.0 [INFO] [stderr] Downloaded hermit-abi v0.1.8 [INFO] [stderr] Downloaded vcpkg v0.2.8 [INFO] [stderr] Downloaded libc v0.2.67 [INFO] [stderr] Downloaded libsqlite3-sys v0.9.3 [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] 94a34195865defddbb9465ac93f62ff98825a6d338d0ec153fc7df20a3cd9c3b [INFO] running `Command { std: "docker" "start" "-a" "94a34195865defddbb9465ac93f62ff98825a6d338d0ec153fc7df20a3cd9c3b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "94a34195865defddbb9465ac93f62ff98825a6d338d0ec153fc7df20a3cd9c3b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "94a34195865defddbb9465ac93f62ff98825a6d338d0ec153fc7df20a3cd9c3b", kill_on_drop: false }` [INFO] [stdout] 94a34195865defddbb9465ac93f62ff98825a6d338d0ec153fc7df20a3cd9c3b [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] f3a42a06690a5d4c9790b725b1681fa593274f8b080b42854fd2351fa1e1e11c [INFO] running `Command { std: "docker" "start" "-a" "f3a42a06690a5d4c9790b725b1681fa593274f8b080b42854fd2351fa1e1e11c", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.67 [INFO] [stderr] Compiling pkg-config v0.3.17 [INFO] [stderr] Compiling typenum v1.11.2 [INFO] [stderr] Compiling proc-macro2 v1.0.9 [INFO] [stderr] Compiling log v0.4.8 [INFO] [stderr] Compiling serde v1.0.104 [INFO] [stderr] Checking cfg-if v0.1.10 [INFO] [stderr] Compiling unicode-xid v0.2.0 [INFO] [stderr] Compiling syn v1.0.16 [INFO] [stderr] Compiling byteorder v1.3.4 [INFO] [stderr] Compiling bitflags v1.2.1 [INFO] [stderr] Checking rand_core v0.4.2 [INFO] [stderr] Checking log v0.3.9 [INFO] [stderr] Checking linked-hash-map v0.5.2 [INFO] [stderr] Checking thread-scoped v1.0.2 [INFO] [stderr] Checking constant_time_eq v0.1.5 [INFO] [stderr] Compiling libsqlite3-sys v0.9.3 [INFO] [stderr] Compiling fuse v0.3.1 [INFO] [stderr] Checking rand_core v0.3.1 [INFO] [stderr] Checking lru-cache v0.1.2 [INFO] [stderr] Checking byte-tools v0.2.0 [INFO] [stderr] Checking time v0.1.42 [INFO] [stderr] Checking num_cpus v1.12.0 [INFO] [stderr] Compiling quote v1.0.2 [INFO] [stderr] Checking threadpool v1.7.1 [INFO] [stderr] Checking users v0.9.1 [INFO] [stderr] Checking rand v0.5.6 [INFO] [stderr] Checking generic-array v0.9.0 [INFO] [stderr] Checking crossbeam-utils v0.5.0 [INFO] [stderr] Checking rusqlite v0.14.0 [INFO] [stderr] Checking crypto-mac v0.5.2 [INFO] [stderr] Checking digest v0.7.6 [INFO] [stderr] Checking hex v0.3.2 [INFO] [stderr] Checking blake2 v0.7.1 [INFO] [stderr] Checking base64 v0.11.0 [INFO] [stderr] Checking fuse_mt v0.4.4 [INFO] [stderr] Compiling serde_derive v1.0.104 [INFO] [stderr] Checking bincode v1.2.1 [INFO] [stderr] Checking toml v0.5.6 [INFO] [stderr] Checking syncer v0.5.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/filesystem/entry.rs:17:10 [INFO] [stdout] | [INFO] [stdout] 17 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/filesystem/entry.rs:17:21 [INFO] [stdout] | [INFO] [stdout] 17 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/filesystem/entry.rs:25:41 [INFO] [stdout] | [INFO] [stdout] 25 | #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/filesystem/entry.rs:25:52 [INFO] [stdout] | [INFO] [stdout] 25 | #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/filesystem/entry.rs:83:35 [INFO] [stdout] | [INFO] [stdout] 83 | #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/filesystem/entry.rs:83:46 [INFO] [stdout] | [INFO] [stdout] 83 | #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/filesystem/vclock.rs:14:35 [INFO] [stdout] | [INFO] [stdout] 14 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/filesystem/vclock.rs:14:46 [INFO] [stdout] | [INFO] [stdout] 14 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/backingstore/mod.rs:22:17 [INFO] [stdout] | [INFO] [stdout] 22 | #[derive(Debug, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/backingstore/mod.rs:22:28 [INFO] [stdout] | [INFO] [stdout] 22 | #[derive(Debug, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/config.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | #[derive(Debug, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/config.rs:14:28 [INFO] [stdout] | [INFO] [stdout] 14 | #[derive(Debug, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/filesystem/entry.rs:125:7 [INFO] [stdout] | [INFO] [stdout] 125 | peernum: peernum, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `peernum` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/filesystem/entry.rs:126:7 [INFO] [stdout] | [INFO] [stdout] 126 | filetype: filetype, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `filetype` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/filesystem/mod.rs:38:7 [INFO] [stdout] | [INFO] [stdout] 38 | peernum: peernum, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `peernum` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `target` [INFO] [stdout] --> src/filesystem/mod.rs:423:9 [INFO] [stdout] | [INFO] [stdout] 423 | #[cfg(target = "macos")] [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `docsrs`, `feature`, and `test` and 31 more [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target, values("macos"))'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(target, values(\"macos\"))");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/filesystem/mod.rs:174:44 [INFO] [stdout] | [INFO] [stdout] 174 | let handle = self.create_handle(Handle{node: node, _flags: flags,}); [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/backingstore/mod.rs:48:7 [INFO] [stdout] | [INFO] [stdout] 48 | zero: zero, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/lib.rs:44:10 [INFO] [stdout] | [INFO] [stdout] 44 | fn new(scope: &Scope<'a>, secs: u64, closure: F) -> Self [INFO] [stdout] | ^ [INFO] [stdout] 45 | where F: Fn() -> Result<(), Error> + Send { [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/filesystem/entry.rs:17:10 [INFO] [stdout] | [INFO] [stdout] 17 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/filesystem/entry.rs:17:21 [INFO] [stdout] | [INFO] [stdout] 17 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/filesystem/entry.rs:25:41 [INFO] [stdout] | [INFO] [stdout] 25 | #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/filesystem/entry.rs:25:52 [INFO] [stdout] | [INFO] [stdout] 25 | #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/filesystem/entry.rs:83:35 [INFO] [stdout] | [INFO] [stdout] 83 | #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/filesystem/entry.rs:83:46 [INFO] [stdout] | [INFO] [stdout] 83 | #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/filesystem/vclock.rs:14:35 [INFO] [stdout] | [INFO] [stdout] 14 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/filesystem/vclock.rs:14:46 [INFO] [stdout] | [INFO] [stdout] 14 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/backingstore/mod.rs:22:17 [INFO] [stdout] | [INFO] [stdout] 22 | #[derive(Debug, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/backingstore/mod.rs:22:28 [INFO] [stdout] | [INFO] [stdout] 22 | #[derive(Debug, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/config.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | #[derive(Debug, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/config.rs:14:28 [INFO] [stdout] | [INFO] [stdout] 14 | #[derive(Debug, Serialize, Deserialize)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/filesystem/entry.rs:125:7 [INFO] [stdout] | [INFO] [stdout] 125 | peernum: peernum, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `peernum` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/filesystem/entry.rs:126:7 [INFO] [stdout] | [INFO] [stdout] 126 | filetype: filetype, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `filetype` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/filesystem/mod.rs:38:7 [INFO] [stdout] | [INFO] [stdout] 38 | peernum: peernum, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `peernum` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `target` [INFO] [stdout] --> src/filesystem/mod.rs:423:9 [INFO] [stdout] | [INFO] [stdout] 423 | #[cfg(target = "macos")] [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `docsrs`, `feature`, and `test` and 31 more [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target, values("macos"))'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(target, values(\"macos\"))");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/filesystem/mod.rs:174:44 [INFO] [stdout] | [INFO] [stdout] 174 | let handle = self.create_handle(Handle{node: node, _flags: flags,}); [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `node` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/backingstore/metadatadb.rs:328:3 [INFO] [stdout] | [INFO] [stdout] 328 | use std; [INFO] [stdout] | ^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/backingstore/mod.rs:48:7 [INFO] [stdout] | [INFO] [stdout] 48 | zero: zero, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `zero` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: bound is defined in more than one place [INFO] [stdout] --> src/lib.rs:44:10 [INFO] [stdout] | [INFO] [stdout] 44 | fn new(scope: &Scope<'a>, secs: u64, closure: F) -> Self [INFO] [stdout] | ^ [INFO] [stdout] 45 | where F: Fn() -> Result<(), Error> + Send { [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations [INFO] [stdout] = note: `#[warn(clippy::multiple_bound_locations)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/filesystem/entry.rs:37:18 [INFO] [stdout] | [INFO] [stdout] 37 | fn to_filetype(&self) -> FileType { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` [INFO] [stdout] --> src/filesystem/entry.rs:115:3 [INFO] [stdout] | [INFO] [stdout] 115 | ostr.to_os_string().into_string().or_else(|_| Err(libc::EIO)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ostr.to_os_string().into_string().map_err(|_| libc::EIO)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/filesystem/entry.rs:146:18 [INFO] [stdout] | [INFO] [stdout] 146 | let blocks = (self.size + 512 -1)/ 512; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `self.size.div_ceil(512)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/filesystem/entry.rs:193:31 [INFO] [stdout] | [INFO] [stdout] 193 | let total_needed_blocks = (self.size as usize + BLKSIZE - 1) / BLKSIZE; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(self.size as usize).div_ceil(BLKSIZE)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/filesystem/entry.rs:202:20 [INFO] [stdout] | [INFO] [stdout] 202 | let endblock = (end + BLKSIZE - 1)/BLKSIZE; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `end.div_ceil(BLKSIZE)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/filesystem/entry.rs:229:20 [INFO] [stdout] | [INFO] [stdout] 229 | let endblock = (end + BLKSIZE - 1)/BLKSIZE; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `end.div_ceil(BLKSIZE)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/filesystem/vclock.rs:40:25 [INFO] [stdout] | [INFO] [stdout] 40 | let vord = v1.cmp(&v2); [INFO] [stdout] | ^^^ help: change this to: `v2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/filesystem/mod.rs:166:5 [INFO] [stdout] | [INFO] [stdout] 166 | / match self.backing.sync_all() { [INFO] [stdout] 167 | | Err(_) => eprintln!("ERROR: couldn't save on shutdown, data may have been lost"), [INFO] [stdout] 168 | | _ => {}, [INFO] [stdout] 169 | | }; [INFO] [stdout] | |_____^ help: try: `if let Err(_) = self.backing.sync_all() { eprintln!("ERROR: couldn't save on shutdown, data may have been lost") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/filesystem/mod.rs:264:38 [INFO] [stdout] | [INFO] [stdout] 264 | let blob = self.backing.add_blob(&data)?; [INFO] [stdout] | ^^^^^ help: change this to: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/filesystem/mod.rs:297:68 [INFO] [stdout] | [INFO] [stdout] 297 | self.modify_handle(fh, true, &(|entry, node| entry.write(node, &self.backing, offset, &data)))? [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `self.backing` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/filesystem/mod.rs:301:59 [INFO] [stdout] | [INFO] [stdout] 301 | self.with_handle(fh, &(|entry, node| entry.read(node, &self.backing, offset, size)))? [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `self.backing` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/filesystem/mod.rs:305:59 [INFO] [stdout] | [INFO] [stdout] 305 | self.with_path(path, &(|entry, node| entry.read(node, &self.backing, 0, BLKSIZE as u32)))? [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `self.backing` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/filesystem/mod.rs:313:10 [INFO] [stdout] | [INFO] [stdout] 313 | if dir.children.len() == 0 {Ok(())} else {Err(libc::ENOTEMPTY)} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `dir.children.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/backingstore/blobstorage.rs:25:11 [INFO] [stdout] | [INFO] [stdout] 25 | use std::{usize, i64}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/backingstore/blobstorage.rs:25:18 [INFO] [stdout] | [INFO] [stdout] 25 | use std::{usize, i64}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i64::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/backingstore/blobstorage.rs:41:30 [INFO] [stdout] | [INFO] [stdout] 41 | Self::new_with_data(vec![0 as u8; size]) [INFO] [stdout] | ^^^^^^^ help: try: `0_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/backingstore/blobstorage.rs:51:41 [INFO] [stdout] | [INFO] [stdout] 51 | let mut file = match fs::File::open(&file) { [INFO] [stdout] | ^^^^^ help: change this to: `file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/backingstore/blobstorage.rs:65:45 [INFO] [stdout] | [INFO] [stdout] 65 | let mut file = match fs::File::create(&file) { [INFO] [stdout] | ^^^^^ help: change this to: `file` [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 slicing of the whole range [INFO] [stdout] --> src/backingstore/blobstorage.rs:88:43 [INFO] [stdout] | [INFO] [stdout] 88 | self.data[start..end].copy_from_slice(&data[..]); [INFO] [stdout] | ^^^^^^^^^ help: use the original value instead: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] = note: `#[warn(clippy::redundant_slicing)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/backingstore/blobstorage.rs:185:18 [INFO] [stdout] | [INFO] [stdout] 185 | return Ok(blob.write(offset, data)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 185 ~ return { [INFO] [stdout] 186 + let _: () = blob.write(offset, data); [INFO] [stdout] 187 + Ok(()) [INFO] [stdout] 188 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/backingstore/blobstorage.rs:191:5 [INFO] [stdout] | [INFO] [stdout] 191 | let hash = blob.write(offset, data); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding and replace variable usages with `()` [INFO] [stdout] | [INFO] [stdout] 191 ~ blob.write(offset, data); [INFO] [stdout] 192 | [INFO] [stdout] ... [INFO] [stdout] 197 | [INFO] [stdout] 198 ~ Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> src/backingstore/blobstorage.rs:195:41 [INFO] [stdout] | [INFO] [stdout] 195 | let blocks = blob_cache.entry(node).or_insert(HashMap::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 20]` which implements the `Copy` trait [INFO] [stdout] --> src/backingstore/blobstorage.rs:223:22 [INFO] [stdout] | [INFO] [stdout] 223 | touched.insert(hash.clone(), (timeval, blob.len())); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*hash` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/backingstore/blobstorage.rs:278:49 [INFO] [stdout] | [INFO] [stdout] 278 | eprintln!("1st hash is {}", hex::encode(&hash)); [INFO] [stdout] | ^^^^^ help: change this to: `hash` [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/backingstore/blobstorage.rs:279:49 [INFO] [stdout] | [INFO] [stdout] 279 | eprintln!("2nd hash is {}", hex::encode(&hash2)); [INFO] [stdout] | ^^^^^^ help: change this to: `hash2` [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: length comparison to zero [INFO] [stdout] --> src/backingstore/blobstorage.rs:330:10 [INFO] [stdout] | [INFO] [stdout] 330 | if hashes.len() == 0 { break } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `hashes.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/backingstore/blobstorage.rs:349:15 [INFO] [stdout] | [INFO] [stdout] 349 | path.push(&self.peerid.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.peerid.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/backingstore/blobstorage.rs:349:15 [INFO] [stdout] | [INFO] [stdout] 349 | path.push(&self.peerid.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `&self.peerid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/backingstore/blobstorage.rs:354:10 [INFO] [stdout] | [INFO] [stdout] 354 | if nodes.len() == 0 { break } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `nodes.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/backingstore/blobstorage.rs:368:7 [INFO] [stdout] | [INFO] [stdout] 368 | / match file.sync_all() { [INFO] [stdout] 369 | | Err(e) => {eprintln!("ERROR: couldn't fsync entries file: {}", e);}, [INFO] [stdout] 370 | | Ok(_) => {}, [INFO] [stdout] 371 | | } [INFO] [stdout] | |_______^ help: try: `if let Err(e) = file.sync_all() {eprintln!("ERROR: couldn't fsync entries file: {}", e);}` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/backingstore/blobstorage.rs:378:23 [INFO] [stdout] | [INFO] [stdout] 378 | remote.push_str(&"/data/nodes/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `"/data/nodes/"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/backingstore/blobstorage.rs:392:21 [INFO] [stdout] | [INFO] [stdout] 392 | remote.push_str(&"/data/nodes/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `"/data/nodes/"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/backingstore/blobstorage.rs:443:10 [INFO] [stdout] | [INFO] [stdout] 443 | if hashes_to_delete.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `hashes_to_delete.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/backingstore/blobstorage.rs:489:21 [INFO] [stdout] | [INFO] [stdout] 489 | remote.push_str(&"/data/blobs/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `"/data/blobs/"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/backingstore/blobstorage.rs:505:21 [INFO] [stdout] | [INFO] [stdout] 505 | remote.push_str(&"/data/blobs/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `"/data/blobs/"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/backingstore/blobstorage.rs:507:5 [INFO] [stdout] | [INFO] [stdout] 507 | / match cmd.run() { [INFO] [stdout] 508 | | Ok(_) => return Ok(()), [INFO] [stdout] 509 | | Err(_) => {}, [INFO] [stdout] 510 | | } [INFO] [stdout] | |_____^ help: try: `if let Ok(_) = cmd.run() { return Ok(()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/backingstore/blobstorage.rs:515:32 [INFO] [stdout] | [INFO] [stdout] 515 | pub fn readahead_from_server<'a>(&'a self, hashes: &[BlobHash]) { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 515 - pub fn readahead_from_server<'a>(&'a self, hashes: &[BlobHash]) { [INFO] [stdout] 515 + pub fn readahead_from_server(&self, hashes: &[BlobHash]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 20]` which implements the `Copy` trait [INFO] [stdout] --> src/backingstore/blobstorage.rs:518:20 [INFO] [stdout] | [INFO] [stdout] 518 | let hash = hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*hash` [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 `[u8; 20]` which implements the `Copy` trait [INFO] [stdout] --> src/backingstore/blobstorage.rs:524:28 [INFO] [stdout] | [INFO] [stdout] 524 | ongoing.insert(hash.clone(), mutex.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `hash` [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 `[u8; 20]` which implements the `Copy` trait [INFO] [stdout] --> src/backingstore/blobstorage.rs:539:32 [INFO] [stdout] | [INFO] [stdout] 539 | touched.insert(hash.clone(), (timeval, blob.len())); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `hash` [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 `[u8; 20]` which implements the `Copy` trait [INFO] [stdout] --> src/backingstore/blobstorage.rs:558:24 [INFO] [stdout] | [INFO] [stdout] 558 | ongoing.insert(hash.clone(), mutex.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/backingstore/blobstorage.rs:578:5 [INFO] [stdout] | [INFO] [stdout] 578 | / match cmd.run() { [INFO] [stdout] 579 | | Ok(_) => true, [INFO] [stdout] 580 | | Err(_) => false, [INFO] [stdout] 581 | | } [INFO] [stdout] | |_____^ help: try: `cmd.run().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/backingstore/metadatadb.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | / for i in 0..HASHSIZE { [INFO] [stdout] 50 | | hasharray[i] = vals[i]; [INFO] [stdout] 51 | | } [INFO] [stdout] | |_____^ help: try replacing the loop by: `hasharray[..HASHSIZE].copy_from_slice(&vals[..HASHSIZE]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 20]` which implements the `Copy` trait [INFO] [stdout] --> src/backingstore/metadatadb.rs:224:26 [INFO] [stdout] | [INFO] [stdout] 224 | let mut vals = vec![(hash.clone(), size, timeval())]; [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*hash` [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 `[u8; 20]` which implements the `Copy` trait [INFO] [stdout] --> src/backingstore/metadatadb.rs:257:25 [INFO] [stdout] | [INFO] [stdout] 257 | let mut vals = vec![hash.clone()]; [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*hash` [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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/backingstore/rsync.rs:30:7 [INFO] [stdout] | [INFO] [stdout] 30 | / match cmd.status() { [INFO] [stdout] 31 | | Ok(v) => { [INFO] [stdout] 32 | | if v.success() { [INFO] [stdout] 33 | | return Ok(()) [INFO] [stdout] ... | [INFO] [stdout] 38 | | Err(_) => {}, [INFO] [stdout] 39 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 30 ~ if let Ok(v) = cmd.status() { [INFO] [stdout] 31 + if v.success() { [INFO] [stdout] 32 + return Ok(()) [INFO] [stdout] 33 + } else { [INFO] [stdout] 34 + continue [INFO] [stdout] 35 + } [INFO] [stdout] 36 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/backingstore/rsync.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | Err(Error::new(ErrorKind::Other, "rsync failed")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 41 - Err(Error::new(ErrorKind::Other, "rsync failed")) [INFO] [stdout] 41 + Err(Error::other("rsync failed")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/backingstore/mod.rs:138:32 [INFO] [stdout] | [INFO] [stdout] 138 | Err(_) => return Err(Error::new(ErrorKind::Other, "sync failed")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 138 - Err(_) => return Err(Error::new(ErrorKind::Other, "sync failed")), [INFO] [stdout] 138 + Err(_) => return Err(Error::other("sync failed")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/backingstore/mod.rs:150:29 [INFO] [stdout] | [INFO] [stdout] 150 | self.blobs.fsync_file(&hash)?; [INFO] [stdout] | ^^^^^ help: change this to: `hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/backingstore/mod.rs:158:21 [INFO] [stdout] | [INFO] [stdout] 158 | Err(_) => Err(Error::new(ErrorKind::Other, "upload failed")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 158 - Err(_) => Err(Error::new(ErrorKind::Other, "upload failed")), [INFO] [stdout] 158 + Err(_) => Err(Error::other("upload failed")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/config.rs:44:27 [INFO] [stdout] | [INFO] [stdout] 44 | peerid: hex::encode(&bytes), [INFO] [stdout] | ^^^^^^ help: change this to: `bytes` [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 boolean expression can be simplified [INFO] [stdout] --> src/config.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | if !hex::decode(&config.peerid).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `hex::decode(&config.peerid).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/filesystem/entry.rs:37:18 [INFO] [stdout] | [INFO] [stdout] 37 | fn to_filetype(&self) -> FileType { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/lib.rs:51:7 [INFO] [stdout] | [INFO] [stdout] 51 | / loop { [INFO] [stdout] 52 | | match rx.recv_timeout(dur) { [INFO] [stdout] 53 | | Err(mpsc::RecvTimeoutError::Timeout) => { [INFO] [stdout] 54 | | match closure() { [INFO] [stdout] ... | [INFO] [stdout] 61 | | } [INFO] [stdout] | |_______^ help: try: `while let Err(mpsc::RecvTimeoutError::Timeout) = rx.recv_timeout(dur) { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:80:16 [INFO] [stdout] | [INFO] [stdout] 80 | return Err(Error::new(ErrorKind::Other, message)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 80 - return Err(Error::new(ErrorKind::Other, message)); [INFO] [stdout] 80 + return Err(Error::other(message)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:83:44 [INFO] [stdout] | [INFO] [stdout] 83 | let bs = match BackingStore::new(source, &conf) { [INFO] [stdout] | ^^^^^ help: change this to: `conf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:85:26 [INFO] [stdout] | [INFO] [stdout] 85 | Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the backing store")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 85 - Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the backing store")), [INFO] [stdout] 85 + Err(_) => return Err(Error::other("Couldn't create the backing store")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:89:26 [INFO] [stdout] | [INFO] [stdout] 89 | Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the filesystem")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 89 - Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the filesystem")), [INFO] [stdout] 89 + Err(_) => return Err(Error::other("Couldn't create the filesystem")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:95:40 [INFO] [stdout] | [INFO] [stdout] 95 | let sync = BackgroundThread::new(&scope, 60, move || bsref.sync_all()); [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:96:40 [INFO] [stdout] | [INFO] [stdout] 96 | let upload = BackgroundThread::new(&scope, 10, move || bsref.do_uploads()); [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:97:40 [INFO] [stdout] | [INFO] [stdout] 97 | let nodes1 = BackgroundThread::new(&scope, 10, move || bsref.do_uploads_nodes()); [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:98:40 [INFO] [stdout] | [INFO] [stdout] 98 | let nodes2 = BackgroundThread::new(&scope, 10, move || bsref.do_downloads_nodes()); [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:99:40 [INFO] [stdout] | [INFO] [stdout] 99 | let remove = BackgroundThread::new(&scope, 10, move || bsref.do_removals()); [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:121:16 [INFO] [stdout] | [INFO] [stdout] 121 | return Err(Error::new(ErrorKind::Other, message)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 121 - return Err(Error::new(ErrorKind::Other, message)); [INFO] [stdout] 121 + return Err(Error::other(message)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:124:44 [INFO] [stdout] | [INFO] [stdout] 124 | let bs = match BackingStore::new(source, &conf) { [INFO] [stdout] | ^^^^^ help: change this to: `conf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:126:26 [INFO] [stdout] | [INFO] [stdout] 126 | Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the backing store")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 126 - Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the backing store")), [INFO] [stdout] 126 + Err(_) => return Err(Error::other("Couldn't create the backing store")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:138:16 [INFO] [stdout] | [INFO] [stdout] 138 | return Err(Error::new(ErrorKind::Other, message)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 138 - return Err(Error::new(ErrorKind::Other, message)); [INFO] [stdout] 138 + return Err(Error::other(message)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:141:44 [INFO] [stdout] | [INFO] [stdout] 141 | let bs = match BackingStore::new(source, &conf) { [INFO] [stdout] | ^^^^^ help: change this to: `conf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:143:26 [INFO] [stdout] | [INFO] [stdout] 143 | Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the backing store")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 143 - Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the backing store")), [INFO] [stdout] 143 + Err(_) => return Err(Error::other("Couldn't create the backing store")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:147:26 [INFO] [stdout] | [INFO] [stdout] 147 | Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the filesystem")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 147 - Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the filesystem")), [INFO] [stdout] 147 + Err(_) => return Err(Error::other("Couldn't create the filesystem")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib.rs:164:28 [INFO] [stdout] | [INFO] [stdout] 164 | let hash = hex::encode(&node.hash); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `node.hash` [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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/filesystem/entry.rs:17:10 [INFO] [stdout] | [INFO] [stdout] 17 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_TimespecDef` [INFO] [stdout] ... [INFO] [stdout] 20 | struct TimespecDef { [INFO] [stdout] | ----------- `TimespecDef` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/filesystem/entry.rs:17:21 [INFO] [stdout] | [INFO] [stdout] 17 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_TimespecDef` [INFO] [stdout] ... [INFO] [stdout] 20 | struct TimespecDef { [INFO] [stdout] | ----------- `TimespecDef` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/filesystem/entry.rs:25:41 [INFO] [stdout] | [INFO] [stdout] 25 | #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_FileTypeDef` [INFO] [stdout] 26 | pub enum FileTypeDef { [INFO] [stdout] | ----------- `FileTypeDef` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/filesystem/entry.rs:25:52 [INFO] [stdout] | [INFO] [stdout] 25 | #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_FileTypeDef` [INFO] [stdout] 26 | pub enum FileTypeDef { [INFO] [stdout] | ----------- `FileTypeDef` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/filesystem/entry.rs:83:35 [INFO] [stdout] | [INFO] [stdout] 83 | #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_FSEntry` [INFO] [stdout] 84 | pub struct FSEntry { [INFO] [stdout] | ------- `FSEntry` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/filesystem/entry.rs:83:46 [INFO] [stdout] | [INFO] [stdout] 83 | #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_FSEntry` [INFO] [stdout] 84 | pub struct FSEntry { [INFO] [stdout] | ------- `FSEntry` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/filesystem/vclock.rs:14:35 [INFO] [stdout] | [INFO] [stdout] 14 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_VectorClock` [INFO] [stdout] 15 | pub struct VectorClock { [INFO] [stdout] | ----------- `VectorClock` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/filesystem/vclock.rs:14:46 [INFO] [stdout] | [INFO] [stdout] 14 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_VectorClock` [INFO] [stdout] 15 | pub struct VectorClock { [INFO] [stdout] | ----------- `VectorClock` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/backingstore/mod.rs:22:17 [INFO] [stdout] | [INFO] [stdout] 22 | #[derive(Debug, Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_NodeInfo` [INFO] [stdout] 23 | pub struct NodeInfo { [INFO] [stdout] | -------- `NodeInfo` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/backingstore/mod.rs:22:28 [INFO] [stdout] | [INFO] [stdout] 22 | #[derive(Debug, Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_NodeInfo` [INFO] [stdout] 23 | pub struct NodeInfo { [INFO] [stdout] | -------- `NodeInfo` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/rwhashes.rs:33:15 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn read(&self, key: &K) -> RwLockReadGuard> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 33 | pub fn read(&self, key: &K) -> RwLockReadGuard<'_, HashMap> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/rwhashes.rs:37:16 [INFO] [stdout] | [INFO] [stdout] 37 | pub fn write(&self, key: &K) -> RwLockWriteGuard> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 37 | pub fn write(&self, key: &K) -> RwLockWriteGuard<'_, HashMap> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/rwhashes.rs:41:20 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn write_pos(&self, index: usize) -> RwLockWriteGuard> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 41 | pub fn write_pos(&self, index: usize) -> RwLockWriteGuard<'_, HashMap> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/config.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | #[derive(Debug, Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Config` [INFO] [stdout] 15 | pub struct Config { [INFO] [stdout] | ------ `Config` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/config.rs:14:28 [INFO] [stdout] | [INFO] [stdout] 14 | #[derive(Debug, Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Config` [INFO] [stdout] 15 | pub struct Config { [INFO] [stdout] | ------ `Config` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` [INFO] [stdout] --> src/filesystem/entry.rs:115:3 [INFO] [stdout] | [INFO] [stdout] 115 | ostr.to_os_string().into_string().or_else(|_| Err(libc::EIO)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ostr.to_os_string().into_string().map_err(|_| libc::EIO)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/filesystem/entry.rs:146:18 [INFO] [stdout] | [INFO] [stdout] 146 | let blocks = (self.size + 512 -1)/ 512; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `self.size.div_ceil(512)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/filesystem/entry.rs:193:31 [INFO] [stdout] | [INFO] [stdout] 193 | let total_needed_blocks = (self.size as usize + BLKSIZE - 1) / BLKSIZE; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `(self.size as usize).div_ceil(BLKSIZE)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/filesystem/entry.rs:202:20 [INFO] [stdout] | [INFO] [stdout] 202 | let endblock = (end + BLKSIZE - 1)/BLKSIZE; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `end.div_ceil(BLKSIZE)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/filesystem/entry.rs:229:20 [INFO] [stdout] | [INFO] [stdout] 229 | let endblock = (end + BLKSIZE - 1)/BLKSIZE; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `end.div_ceil(BLKSIZE)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/filesystem/vclock.rs:40:25 [INFO] [stdout] | [INFO] [stdout] 40 | let vord = v1.cmp(&v2); [INFO] [stdout] | ^^^ help: change this to: `v2` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/filesystem/mod.rs:166:5 [INFO] [stdout] | [INFO] [stdout] 166 | / match self.backing.sync_all() { [INFO] [stdout] 167 | | Err(_) => eprintln!("ERROR: couldn't save on shutdown, data may have been lost"), [INFO] [stdout] 168 | | _ => {}, [INFO] [stdout] 169 | | }; [INFO] [stdout] | |_____^ help: try: `if let Err(_) = self.backing.sync_all() { eprintln!("ERROR: couldn't save on shutdown, data may have been lost") }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/filesystem/mod.rs:264:38 [INFO] [stdout] | [INFO] [stdout] 264 | let blob = self.backing.add_blob(&data)?; [INFO] [stdout] | ^^^^^ help: change this to: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/filesystem/mod.rs:297:68 [INFO] [stdout] | [INFO] [stdout] 297 | self.modify_handle(fh, true, &(|entry, node| entry.write(node, &self.backing, offset, &data)))? [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `self.backing` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/filesystem/mod.rs:301:59 [INFO] [stdout] | [INFO] [stdout] 301 | self.with_handle(fh, &(|entry, node| entry.read(node, &self.backing, offset, size)))? [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `self.backing` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/filesystem/mod.rs:305:59 [INFO] [stdout] | [INFO] [stdout] 305 | self.with_path(path, &(|entry, node| entry.read(node, &self.backing, 0, BLKSIZE as u32)))? [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `self.backing` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/filesystem/mod.rs:313:10 [INFO] [stdout] | [INFO] [stdout] 313 | if dir.children.len() == 0 {Ok(())} else {Err(libc::ENOTEMPTY)} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `dir.children.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/backingstore/blobstorage.rs:25:11 [INFO] [stdout] | [INFO] [stdout] 25 | use std::{usize, i64}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/backingstore/blobstorage.rs:25:18 [INFO] [stdout] | [INFO] [stdout] 25 | use std::{usize, i64}; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i64::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u8` is unnecessary [INFO] [stdout] --> src/backingstore/blobstorage.rs:41:30 [INFO] [stdout] | [INFO] [stdout] 41 | Self::new_with_data(vec![0 as u8; size]) [INFO] [stdout] | ^^^^^^^ help: try: `0_u8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/backingstore/blobstorage.rs:51:41 [INFO] [stdout] | [INFO] [stdout] 51 | let mut file = match fs::File::open(&file) { [INFO] [stdout] | ^^^^^ help: change this to: `file` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/backingstore/blobstorage.rs:65:45 [INFO] [stdout] | [INFO] [stdout] 65 | let mut file = match fs::File::create(&file) { [INFO] [stdout] | ^^^^^ help: change this to: `file` [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 slicing of the whole range [INFO] [stdout] --> src/backingstore/blobstorage.rs:88:43 [INFO] [stdout] | [INFO] [stdout] 88 | self.data[start..end].copy_from_slice(&data[..]); [INFO] [stdout] | ^^^^^^^^^ help: use the original value instead: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_slicing [INFO] [stdout] = note: `#[warn(clippy::redundant_slicing)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/backingstore/blobstorage.rs:185:18 [INFO] [stdout] | [INFO] [stdout] 185 | return Ok(blob.write(offset, data)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 185 ~ return { [INFO] [stdout] 186 + let _: () = blob.write(offset, data); [INFO] [stdout] 187 + Ok(()) [INFO] [stdout] 188 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/backingstore/blobstorage.rs:191:5 [INFO] [stdout] | [INFO] [stdout] 191 | let hash = blob.write(offset, data); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding and replace variable usages with `()` [INFO] [stdout] | [INFO] [stdout] 191 ~ blob.write(offset, data); [INFO] [stdout] 192 | [INFO] [stdout] ... [INFO] [stdout] 197 | [INFO] [stdout] 198 ~ Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `or_insert` to construct default value [INFO] [stdout] --> src/backingstore/blobstorage.rs:195:41 [INFO] [stdout] | [INFO] [stdout] 195 | let blocks = blob_cache.entry(node).or_insert(HashMap::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 20]` which implements the `Copy` trait [INFO] [stdout] --> src/backingstore/blobstorage.rs:223:22 [INFO] [stdout] | [INFO] [stdout] 223 | touched.insert(hash.clone(), (timeval, blob.len())); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*hash` [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: the borrowed expression implements the required traits [INFO] [stdout] --> src/backingstore/blobstorage.rs:278:49 [INFO] [stdout] | [INFO] [stdout] 278 | eprintln!("1st hash is {}", hex::encode(&hash)); [INFO] [stdout] | ^^^^^ help: change this to: `hash` [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/backingstore/blobstorage.rs:279:49 [INFO] [stdout] | [INFO] [stdout] 279 | eprintln!("2nd hash is {}", hex::encode(&hash2)); [INFO] [stdout] | ^^^^^^ help: change this to: `hash2` [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: length comparison to zero [INFO] [stdout] --> src/backingstore/blobstorage.rs:330:10 [INFO] [stdout] | [INFO] [stdout] 330 | if hashes.len() == 0 { break } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `hashes.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: the borrowed expression implements the required traits [INFO] [stdout] --> src/backingstore/blobstorage.rs:349:15 [INFO] [stdout] | [INFO] [stdout] 349 | path.push(&self.peerid.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.peerid.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/backingstore/blobstorage.rs:349:15 [INFO] [stdout] | [INFO] [stdout] 349 | path.push(&self.peerid.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `&self.peerid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/backingstore/blobstorage.rs:354:10 [INFO] [stdout] | [INFO] [stdout] 354 | if nodes.len() == 0 { break } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `nodes.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: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/backingstore/blobstorage.rs:368:7 [INFO] [stdout] | [INFO] [stdout] 368 | / match file.sync_all() { [INFO] [stdout] 369 | | Err(e) => {eprintln!("ERROR: couldn't fsync entries file: {}", e);}, [INFO] [stdout] 370 | | Ok(_) => {}, [INFO] [stdout] 371 | | } [INFO] [stdout] | |_______^ help: try: `if let Err(e) = file.sync_all() {eprintln!("ERROR: couldn't fsync entries file: {}", e);}` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/backingstore/blobstorage.rs:378:23 [INFO] [stdout] | [INFO] [stdout] 378 | remote.push_str(&"/data/nodes/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `"/data/nodes/"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/backingstore/blobstorage.rs:392:21 [INFO] [stdout] | [INFO] [stdout] 392 | remote.push_str(&"/data/nodes/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `"/data/nodes/"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/backingstore/blobstorage.rs:443:10 [INFO] [stdout] | [INFO] [stdout] 443 | if hashes_to_delete.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `hashes_to_delete.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/backingstore/blobstorage.rs:489:21 [INFO] [stdout] | [INFO] [stdout] 489 | remote.push_str(&"/data/blobs/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `"/data/blobs/"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/backingstore/blobstorage.rs:505:21 [INFO] [stdout] | [INFO] [stdout] 505 | remote.push_str(&"/data/blobs/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `"/data/blobs/"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/backingstore/blobstorage.rs:507:5 [INFO] [stdout] | [INFO] [stdout] 507 | / match cmd.run() { [INFO] [stdout] 508 | | Ok(_) => return Ok(()), [INFO] [stdout] 509 | | Err(_) => {}, [INFO] [stdout] 510 | | } [INFO] [stdout] | |_____^ help: try: `if let Ok(_) = cmd.run() { return Ok(()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/backingstore/blobstorage.rs:515:32 [INFO] [stdout] | [INFO] [stdout] 515 | pub fn readahead_from_server<'a>(&'a self, hashes: &[BlobHash]) { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 515 - pub fn readahead_from_server<'a>(&'a self, hashes: &[BlobHash]) { [INFO] [stdout] 515 + pub fn readahead_from_server(&self, hashes: &[BlobHash]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 20]` which implements the `Copy` trait [INFO] [stdout] --> src/backingstore/blobstorage.rs:518:20 [INFO] [stdout] | [INFO] [stdout] 518 | let hash = hash.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*hash` [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 `[u8; 20]` which implements the `Copy` trait [INFO] [stdout] --> src/backingstore/blobstorage.rs:524:28 [INFO] [stdout] | [INFO] [stdout] 524 | ongoing.insert(hash.clone(), mutex.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `hash` [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 `[u8; 20]` which implements the `Copy` trait [INFO] [stdout] --> src/backingstore/blobstorage.rs:539:32 [INFO] [stdout] | [INFO] [stdout] 539 | touched.insert(hash.clone(), (timeval, blob.len())); [INFO] [stdout] | ^^^^^^^^^^^^ help: try removing the `clone` call: `hash` [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 `[u8; 20]` which implements the `Copy` trait [INFO] [stdout] --> src/backingstore/blobstorage.rs:558:24 [INFO] [stdout] | [INFO] [stdout] 558 | ongoing.insert(hash.clone(), mutex.clone()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/backingstore/blobstorage.rs:578:5 [INFO] [stdout] | [INFO] [stdout] 578 | / match cmd.run() { [INFO] [stdout] 579 | | Ok(_) => true, [INFO] [stdout] 580 | | Err(_) => false, [INFO] [stdout] 581 | | } [INFO] [stdout] | |_____^ help: try: `cmd.run().is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: it looks like you're manually copying between slices [INFO] [stdout] --> src/backingstore/metadatadb.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | / for i in 0..HASHSIZE { [INFO] [stdout] 50 | | hasharray[i] = vals[i]; [INFO] [stdout] 51 | | } [INFO] [stdout] | |_____^ help: try replacing the loop by: `hasharray[..HASHSIZE].copy_from_slice(&vals[..HASHSIZE]);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy [INFO] [stdout] = note: `#[warn(clippy::manual_memcpy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 20]` which implements the `Copy` trait [INFO] [stdout] --> src/backingstore/metadatadb.rs:224:26 [INFO] [stdout] | [INFO] [stdout] 224 | let mut vals = vec![(hash.clone(), size, timeval())]; [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*hash` [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 `[u8; 20]` which implements the `Copy` trait [INFO] [stdout] --> src/backingstore/metadatadb.rs:257:25 [INFO] [stdout] | [INFO] [stdout] 257 | let mut vals = vec![hash.clone()]; [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*hash` [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: importing legacy numeric constants [INFO] [stdout] --> src/backingstore/metadatadb.rs:329:7 [INFO] [stdout] | [INFO] [stdout] 329 | use std::i64; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `i64::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/backingstore/metadatadb.rs:335:5 [INFO] [stdout] | [INFO] [stdout] 335 | assert_eq!(db.node_exists((0,0)).unwrap(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 335 - assert_eq!(db.node_exists((0,0)).unwrap(), false); [INFO] [stdout] 335 + assert!(!db.node_exists((0,0)).unwrap()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/backingstore/metadatadb.rs:338:5 [INFO] [stdout] | [INFO] [stdout] 338 | assert_eq!(db.node_exists((0,0)).unwrap(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 338 - assert_eq!(db.node_exists((0,0)).unwrap(), true); [INFO] [stdout] 338 + assert!(db.node_exists((0,0)).unwrap()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/backingstore/metadatadb.rs:359:5 [INFO] [stdout] | [INFO] [stdout] 359 | assert_eq!(db.node_exists((0,0)).unwrap(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 359 - assert_eq!(db.node_exists((0,0)).unwrap(), false); [INFO] [stdout] 359 + assert!(!db.node_exists((0,0)).unwrap()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/backingstore/metadatadb.rs:398:5 [INFO] [stdout] | [INFO] [stdout] 398 | assert_eq!(db.node_exists_long((0,0), &from_hash1, time1).unwrap(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 398 - assert_eq!(db.node_exists_long((0,0), &from_hash1, time1).unwrap(), false); [INFO] [stdout] 398 + assert!(!db.node_exists_long((0,0), &from_hash1, time1).unwrap()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/backingstore/metadatadb.rs:400:5 [INFO] [stdout] | [INFO] [stdout] 400 | assert_eq!(db.node_exists_long((0,0), &from_hash1, time1).unwrap(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 400 - assert_eq!(db.node_exists_long((0,0), &from_hash1, time1).unwrap(), false); [INFO] [stdout] 400 + assert!(!db.node_exists_long((0,0), &from_hash1, time1).unwrap()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/backingstore/metadatadb.rs:401:5 [INFO] [stdout] | [INFO] [stdout] 401 | assert_eq!(db.node_exists_long((0,0), &from_hash2, time1).unwrap(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 401 - assert_eq!(db.node_exists_long((0,0), &from_hash2, time1).unwrap(), false); [INFO] [stdout] 401 + assert!(!db.node_exists_long((0,0), &from_hash2, time1).unwrap()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/backingstore/metadatadb.rs:402:5 [INFO] [stdout] | [INFO] [stdout] 402 | assert_eq!(db.node_exists_long((0,0), &from_hash1, time2).unwrap(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 402 - assert_eq!(db.node_exists_long((0,0), &from_hash1, time2).unwrap(), false); [INFO] [stdout] 402 + assert!(!db.node_exists_long((0,0), &from_hash1, time2).unwrap()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/backingstore/metadatadb.rs:403:5 [INFO] [stdout] | [INFO] [stdout] 403 | assert_eq!(db.node_exists_long((0,0), &from_hash2, time2).unwrap(), true); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 403 - assert_eq!(db.node_exists_long((0,0), &from_hash2, time2).unwrap(), true); [INFO] [stdout] 403 + assert!(db.node_exists_long((0,0), &from_hash2, time2).unwrap()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/backingstore/metadatadb.rs:410:5 [INFO] [stdout] | [INFO] [stdout] 410 | assert_eq!(db.node_exists((0,0)).unwrap(), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 410 - assert_eq!(db.node_exists((0,0)).unwrap(), false); [INFO] [stdout] 410 + assert!(!db.node_exists((0,0)).unwrap()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/backingstore/metadatadb.rs:438:5 [INFO] [stdout] | [INFO] [stdout] 438 | assert_eq!(false, synced); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 438 - assert_eq!(false, synced); [INFO] [stdout] 438 + assert!(!synced); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/backingstore/metadatadb.rs:446:5 [INFO] [stdout] | [INFO] [stdout] 446 | assert_eq!(true, synced); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 446 - assert_eq!(true, synced); [INFO] [stdout] 446 + assert!(synced); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/backingstore/metadatadb.rs:461:5 [INFO] [stdout] | [INFO] [stdout] 461 | assert_eq!(true, synced); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 461 - assert_eq!(true, synced); [INFO] [stdout] 461 + assert!(synced); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::vec::Vec<[u8; 20]>` [INFO] [stdout] --> src/backingstore/metadatadb.rs:475:36 [INFO] [stdout] | [INFO] [stdout] 475 | let to_upload: Vec = db.to_upload().into(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `db.to_upload()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/backingstore/rsync.rs:30:7 [INFO] [stdout] | [INFO] [stdout] 30 | / match cmd.status() { [INFO] [stdout] 31 | | Ok(v) => { [INFO] [stdout] 32 | | if v.success() { [INFO] [stdout] 33 | | return Ok(()) [INFO] [stdout] ... | [INFO] [stdout] 38 | | Err(_) => {}, [INFO] [stdout] 39 | | } [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 30 ~ if let Ok(v) = cmd.status() { [INFO] [stdout] 31 + if v.success() { [INFO] [stdout] 32 + return Ok(()) [INFO] [stdout] 33 + } else { [INFO] [stdout] 34 + continue [INFO] [stdout] 35 + } [INFO] [stdout] 36 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/backingstore/rsync.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | Err(Error::new(ErrorKind::Other, "rsync failed")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 41 - Err(Error::new(ErrorKind::Other, "rsync failed")) [INFO] [stdout] 41 + Err(Error::other("rsync failed")) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/backingstore/mod.rs:138:32 [INFO] [stdout] | [INFO] [stdout] 138 | Err(_) => return Err(Error::new(ErrorKind::Other, "sync failed")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 138 - Err(_) => return Err(Error::new(ErrorKind::Other, "sync failed")), [INFO] [stdout] 138 + Err(_) => return Err(Error::other("sync failed")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/backingstore/mod.rs:150:29 [INFO] [stdout] | [INFO] [stdout] 150 | self.blobs.fsync_file(&hash)?; [INFO] [stdout] | ^^^^^ help: change this to: `hash` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/backingstore/mod.rs:158:21 [INFO] [stdout] | [INFO] [stdout] 158 | Err(_) => Err(Error::new(ErrorKind::Other, "upload failed")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 158 - Err(_) => Err(Error::new(ErrorKind::Other, "upload failed")), [INFO] [stdout] 158 + Err(_) => Err(Error::other("upload failed")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/config.rs:44:27 [INFO] [stdout] | [INFO] [stdout] 44 | peerid: hex::encode(&bytes), [INFO] [stdout] | ^^^^^^ help: change this to: `bytes` [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 boolean expression can be simplified [INFO] [stdout] --> src/config.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | if !hex::decode(&config.peerid).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `hex::decode(&config.peerid).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/config.rs:100:28 [INFO] [stdout] | [INFO] [stdout] 100 | let text = hex::encode(&vals); [INFO] [stdout] | ^^^^^ help: change this to: `vals` [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 loop could be written as a `while let` loop [INFO] [stdout] --> src/lib.rs:51:7 [INFO] [stdout] | [INFO] [stdout] 51 | / loop { [INFO] [stdout] 52 | | match rx.recv_timeout(dur) { [INFO] [stdout] 53 | | Err(mpsc::RecvTimeoutError::Timeout) => { [INFO] [stdout] 54 | | match closure() { [INFO] [stdout] ... | [INFO] [stdout] 61 | | } [INFO] [stdout] | |_______^ help: try: `while let Err(mpsc::RecvTimeoutError::Timeout) = rx.recv_timeout(dur) { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:80:16 [INFO] [stdout] | [INFO] [stdout] 80 | return Err(Error::new(ErrorKind::Other, message)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 80 - return Err(Error::new(ErrorKind::Other, message)); [INFO] [stdout] 80 + return Err(Error::other(message)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:83:44 [INFO] [stdout] | [INFO] [stdout] 83 | let bs = match BackingStore::new(source, &conf) { [INFO] [stdout] | ^^^^^ help: change this to: `conf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:85:26 [INFO] [stdout] | [INFO] [stdout] 85 | Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the backing store")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 85 - Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the backing store")), [INFO] [stdout] 85 + Err(_) => return Err(Error::other("Couldn't create the backing store")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:89:26 [INFO] [stdout] | [INFO] [stdout] 89 | Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the filesystem")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 89 - Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the filesystem")), [INFO] [stdout] 89 + Err(_) => return Err(Error::other("Couldn't create the filesystem")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:95:40 [INFO] [stdout] | [INFO] [stdout] 95 | let sync = BackgroundThread::new(&scope, 60, move || bsref.sync_all()); [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:96:40 [INFO] [stdout] | [INFO] [stdout] 96 | let upload = BackgroundThread::new(&scope, 10, move || bsref.do_uploads()); [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:97:40 [INFO] [stdout] | [INFO] [stdout] 97 | let nodes1 = BackgroundThread::new(&scope, 10, move || bsref.do_uploads_nodes()); [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:98:40 [INFO] [stdout] | [INFO] [stdout] 98 | let nodes2 = BackgroundThread::new(&scope, 10, move || bsref.do_downloads_nodes()); [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:99:40 [INFO] [stdout] | [INFO] [stdout] 99 | let remove = BackgroundThread::new(&scope, 10, move || bsref.do_removals()); [INFO] [stdout] | ^^^^^^ help: change this to: `scope` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:121:16 [INFO] [stdout] | [INFO] [stdout] 121 | return Err(Error::new(ErrorKind::Other, message)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 121 - return Err(Error::new(ErrorKind::Other, message)); [INFO] [stdout] 121 + return Err(Error::other(message)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:124:44 [INFO] [stdout] | [INFO] [stdout] 124 | let bs = match BackingStore::new(source, &conf) { [INFO] [stdout] | ^^^^^ help: change this to: `conf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:126:26 [INFO] [stdout] | [INFO] [stdout] 126 | Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the backing store")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 126 - Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the backing store")), [INFO] [stdout] 126 + Err(_) => return Err(Error::other("Couldn't create the backing store")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:138:16 [INFO] [stdout] | [INFO] [stdout] 138 | return Err(Error::new(ErrorKind::Other, message)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 138 - return Err(Error::new(ErrorKind::Other, message)); [INFO] [stdout] 138 + return Err(Error::other(message)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/lib.rs:141:44 [INFO] [stdout] | [INFO] [stdout] 141 | let bs = match BackingStore::new(source, &conf) { [INFO] [stdout] | ^^^^^ help: change this to: `conf` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:143:26 [INFO] [stdout] | [INFO] [stdout] 143 | Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the backing store")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 143 - Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the backing store")), [INFO] [stdout] 143 + Err(_) => return Err(Error::other("Couldn't create the backing store")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/lib.rs:147:26 [INFO] [stdout] | [INFO] [stdout] 147 | Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the filesystem")), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 147 - Err(_) => return Err(Error::new(ErrorKind::Other, "Couldn't create the filesystem")), [INFO] [stdout] 147 + Err(_) => return Err(Error::other("Couldn't create the filesystem")), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/lib.rs:164:28 [INFO] [stdout] | [INFO] [stdout] 164 | let hash = hex::encode(&node.hash); [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `node.hash` [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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/filesystem/entry.rs:17:10 [INFO] [stdout] | [INFO] [stdout] 17 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_TimespecDef` [INFO] [stdout] ... [INFO] [stdout] 20 | struct TimespecDef { [INFO] [stdout] | ----------- `TimespecDef` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/filesystem/entry.rs:17:21 [INFO] [stdout] | [INFO] [stdout] 17 | #[derive(Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_TimespecDef` [INFO] [stdout] ... [INFO] [stdout] 20 | struct TimespecDef { [INFO] [stdout] | ----------- `TimespecDef` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/filesystem/entry.rs:25:41 [INFO] [stdout] | [INFO] [stdout] 25 | #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_FileTypeDef` [INFO] [stdout] 26 | pub enum FileTypeDef { [INFO] [stdout] | ----------- `FileTypeDef` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/filesystem/entry.rs:25:52 [INFO] [stdout] | [INFO] [stdout] 25 | #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_FileTypeDef` [INFO] [stdout] 26 | pub enum FileTypeDef { [INFO] [stdout] | ----------- `FileTypeDef` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/filesystem/entry.rs:83:35 [INFO] [stdout] | [INFO] [stdout] 83 | #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_FSEntry` [INFO] [stdout] 84 | pub struct FSEntry { [INFO] [stdout] | ------- `FSEntry` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/filesystem/entry.rs:83:46 [INFO] [stdout] | [INFO] [stdout] 83 | #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_FSEntry` [INFO] [stdout] 84 | pub struct FSEntry { [INFO] [stdout] | ------- `FSEntry` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/filesystem/vclock.rs:14:35 [INFO] [stdout] | [INFO] [stdout] 14 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_VectorClock` [INFO] [stdout] 15 | pub struct VectorClock { [INFO] [stdout] | ----------- `VectorClock` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/filesystem/vclock.rs:14:46 [INFO] [stdout] | [INFO] [stdout] 14 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_VectorClock` [INFO] [stdout] 15 | pub struct VectorClock { [INFO] [stdout] | ----------- `VectorClock` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/backingstore/mod.rs:22:17 [INFO] [stdout] | [INFO] [stdout] 22 | #[derive(Debug, Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_NodeInfo` [INFO] [stdout] 23 | pub struct NodeInfo { [INFO] [stdout] | -------- `NodeInfo` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/backingstore/mod.rs:22:28 [INFO] [stdout] | [INFO] [stdout] 22 | #[derive(Debug, Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_NodeInfo` [INFO] [stdout] 23 | pub struct NodeInfo { [INFO] [stdout] | -------- `NodeInfo` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/rwhashes.rs:33:15 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn read(&self, key: &K) -> RwLockReadGuard> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 33 | pub fn read(&self, key: &K) -> RwLockReadGuard<'_, HashMap> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/rwhashes.rs:37:16 [INFO] [stdout] | [INFO] [stdout] 37 | pub fn write(&self, key: &K) -> RwLockWriteGuard> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 37 | pub fn write(&self, key: &K) -> RwLockWriteGuard<'_, HashMap> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/rwhashes.rs:41:20 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn write_pos(&self, index: usize) -> RwLockWriteGuard> { [INFO] [stdout] | ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 41 | pub fn write_pos(&self, index: usize) -> RwLockWriteGuard<'_, HashMap> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/config.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | #[derive(Debug, Serialize, Deserialize)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Config` [INFO] [stdout] 15 | pub struct Config { [INFO] [stdout] | ------ `Config` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/config.rs:14:28 [INFO] [stdout] | [INFO] [stdout] 14 | #[derive(Debug, Serialize, Deserialize)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Config` [INFO] [stdout] 15 | pub struct Config { [INFO] [stdout] | ------ `Config` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [optimized + debuginfo] target(s) in 19.10s [INFO] running `Command { std: "docker" "inspect" "f3a42a06690a5d4c9790b725b1681fa593274f8b080b42854fd2351fa1e1e11c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f3a42a06690a5d4c9790b725b1681fa593274f8b080b42854fd2351fa1e1e11c", kill_on_drop: false }` [INFO] [stdout] f3a42a06690a5d4c9790b725b1681fa593274f8b080b42854fd2351fa1e1e11c