[INFO] cloning repository https://github.com/Nanite-Factory-Games/whaledrive [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Nanite-Factory-Games/whaledrive" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FNanite-Factory-Games%2Fwhaledrive", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FNanite-Factory-Games%2Fwhaledrive'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9882b1fcbbd0ce926e44f3ac3b1646b62f08f2fb [INFO] linting Nanite-Factory-Games/whaledrive against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FNanite-Factory-Games%2Fwhaledrive" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-3-tc1/source/rust-toolchain.toml [INFO] started tweaking git repo https://github.com/Nanite-Factory-Games/whaledrive [INFO] finished tweaking git repo https://github.com/Nanite-Factory-Games/whaledrive [INFO] tweaked toml for git repo https://github.com/Nanite-Factory-Games/whaledrive written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Nanite-Factory-Games/whaledrive 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/Nanite-Factory-Games/whaledrive already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded du v0.1.1 [INFO] [stderr] Downloaded docker-api v0.14.0 [INFO] [stderr] Downloaded containers-api v0.9.0 [INFO] [stderr] Downloaded async-compression v0.4.12 [INFO] [stderr] Downloaded docker-api-stubs v0.5.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 8f10c6fe387c55dc84b243ea477479bfd54259639dd575d3208c418162b99e26 [INFO] running `Command { std: "docker" "start" "-a" "8f10c6fe387c55dc84b243ea477479bfd54259639dd575d3208c418162b99e26", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8f10c6fe387c55dc84b243ea477479bfd54259639dd575d3208c418162b99e26", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8f10c6fe387c55dc84b243ea477479bfd54259639dd575d3208c418162b99e26", kill_on_drop: false }` [INFO] [stdout] 8f10c6fe387c55dc84b243ea477479bfd54259639dd575d3208c418162b99e26 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 77a492273da95aa9acd08c69520345d1bffd0dd56358e939a3f89f039a61d02a [INFO] running `Command { std: "docker" "start" "-a" "77a492273da95aa9acd08c69520345d1bffd0dd56358e939a3f89f039a61d02a", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.72 [INFO] [stderr] Checking bytes v1.7.1 [INFO] [stderr] Compiling libc v0.2.155 [INFO] [stderr] Checking lock_api v0.4.12 [INFO] [stderr] Checking futures-channel v0.3.30 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Checking mio v1.0.1 [INFO] [stderr] Checking signal-hook-registry v1.4.2 [INFO] [stderr] Checking futures-io v0.3.30 [INFO] [stderr] Compiling httparse v1.9.4 [INFO] [stderr] Compiling dunce v1.0.4 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Compiling fs_extra v1.3.0 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Compiling serde v1.0.204 [INFO] [stderr] Compiling aws-lc-rs v1.8.1 [INFO] [stderr] Checking linux-raw-sys v0.4.14 [INFO] [stderr] Checking http v1.1.0 [INFO] [stderr] Checking rustls-pki-types v1.7.0 [INFO] [stderr] Checking indexmap v2.3.0 [INFO] [stderr] Checking getrandom v0.2.15 [INFO] [stderr] Compiling jobserver v0.1.32 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking mirai-annotations v1.12.0 [INFO] [stderr] Checking spin v0.9.8 [INFO] [stderr] Compiling serde_json v1.0.122 [INFO] [stderr] Compiling cc v1.1.7 [INFO] [stderr] Checking miniz_oxide v0.7.4 [INFO] [stderr] Checking unicode-normalization v0.1.23 [INFO] [stderr] Checking http v0.2.12 [INFO] [stderr] Checking rustix v0.38.34 [INFO] [stderr] Compiling rustls v0.23.12 [INFO] [stderr] Checking flate2 v1.0.31 [INFO] [stderr] Checking idna v0.5.0 [INFO] [stderr] Checking http-body v1.0.1 [INFO] [stderr] Checking anstyle-parse v0.2.5 [INFO] [stderr] Checking filetime v0.2.23 [INFO] [stderr] Checking colorchoice v1.0.2 [INFO] [stderr] Checking anstyle-query v1.1.1 [INFO] [stderr] Checking anstyle v1.0.8 [INFO] [stderr] Checking http-body v0.4.6 [INFO] [stderr] Checking webpki-roots v0.26.3 [INFO] [stderr] Checking url v2.5.2 [INFO] [stderr] Compiling camino v1.1.7 [INFO] [stderr] Compiling cmake v0.1.50 [INFO] [stderr] Checking anstream v0.6.15 [INFO] [stderr] Checking unicode-width v0.1.13 [INFO] [stderr] Checking clap_lex v0.7.2 [INFO] [stderr] Checking getopts v0.2.21 [INFO] [stderr] Checking rustls-pemfile v2.1.3 [INFO] [stderr] Checking clap_builder v4.5.13 [INFO] [stderr] Checking home v0.5.9 [INFO] [stderr] Checking du v0.1.1 [INFO] [stderr] Compiling aws-lc-sys v0.20.1 [INFO] [stderr] Compiling ring v0.17.8 [INFO] [stderr] Checking xattr v1.3.1 [INFO] [stderr] Checking tempfile v3.11.0 [INFO] [stderr] Checking which v6.0.3 [INFO] [stderr] Checking tar v0.4.41 [INFO] [stderr] Compiling darling_core v0.20.10 [INFO] [stderr] Compiling tokio-macros v2.4.0 [INFO] [stderr] Compiling futures-macro v0.3.30 [INFO] [stderr] Compiling pin-project-internal v1.1.5 [INFO] [stderr] Compiling serde_derive v1.0.204 [INFO] [stderr] Compiling zeroize_derive v1.4.2 [INFO] [stderr] Checking tokio v1.39.2 [INFO] [stderr] Checking futures-util v0.3.30 [INFO] [stderr] Checking zeroize v1.8.1 [INFO] [stderr] Compiling thiserror-impl v1.0.63 [INFO] [stderr] Compiling clap_derive v4.5.13 [INFO] [stderr] Compiling darling_macro v0.20.10 [INFO] [stderr] Compiling darling v0.20.10 [INFO] [stderr] Compiling serde_with_macros v2.3.3 [INFO] [stderr] Checking pin-project v1.1.5 [INFO] [stderr] Checking thiserror v1.0.63 [INFO] [stderr] Checking clap v4.5.13 [INFO] [stderr] Checking http-body-util v0.1.2 [INFO] [stderr] Checking futures-executor v0.3.30 [INFO] [stderr] Checking asynchronous-codec v0.6.2 [INFO] [stderr] Checking futures v0.3.30 [INFO] [stderr] Checking tokio-util v0.7.11 [INFO] [stderr] Checking tower v0.4.13 [INFO] [stderr] Checking hyper v0.14.30 [INFO] [stderr] Checking async-compression v0.4.12 [INFO] [stderr] Checking h2 v0.4.5 [INFO] [stderr] Checking chrono v0.4.38 [INFO] [stderr] Checking serde_with v2.3.3 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking hyperlocal v0.8.0 [INFO] [stderr] Checking containers-api v0.9.0 [INFO] [stderr] Checking hyper v1.4.1 [INFO] [stderr] Checking docker-api-stubs v0.5.0 [INFO] [stderr] Checking hyper-util v0.1.7 [INFO] [stderr] Checking hyperlocal v0.9.1 [INFO] [stderr] Checking rustls-webpki v0.102.6 [INFO] [stderr] Checking tokio-rustls v0.26.0 [INFO] [stderr] Checking hyper-rustls v0.27.2 [INFO] [stderr] Checking reqwest v0.12.5 [INFO] [stderr] Checking docker-api v0.14.0 [INFO] [stderr] Checking whaledrive v0.0.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `clap::builder::Str` [INFO] [stdout] --> src/cli_commands.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use clap::builder::Str; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Utf8Path` [INFO] [stdout] --> src/models/input_models.rs:1:14 [INFO] [stdout] | [INFO] [stdout] 1 | use camino::{Utf8Path, Utf8PathBuf}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::str` [INFO] [stdout] --> src/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::str; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Output`, `thread::sleep`, and `time::Duration` [INFO] [stdout] --> src/utils.rs:2:78 [INFO] [stdout] | [INFO] [stdout] 2 | use std::{fmt::Display, fs::{self, File}, io, path::Path, process::{Command, Output, Stdio}, thread::sleep, time::Duration}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Manifest`, `Platform`, `docker_client::DockerClient`, and `paths::get_images_path` [INFO] [stdout] --> src/utils.rs:11:208 [INFO] [stdout] | [INFO] [stdout] 11 | ...unmount_file}, docker_client::DockerClient, models::registry_models::{Manifest, Platform}, paths::get_images_path}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `clap::builder::Str` [INFO] [stdout] --> src/cli_commands.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use clap::builder::Str; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Utf8Path` [INFO] [stdout] --> src/models/input_models.rs:1:14 [INFO] [stdout] | [INFO] [stdout] 1 | use camino::{Utf8Path, Utf8PathBuf}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::str` [INFO] [stdout] --> src/utils.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::str; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Output`, `thread::sleep`, and `time::Duration` [INFO] [stdout] --> src/utils.rs:2:78 [INFO] [stdout] | [INFO] [stdout] 2 | use std::{fmt::Display, fs::{self, File}, io, path::Path, process::{Command, Output, Stdio}, thread::sleep, time::Duration}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Manifest`, `Platform`, `docker_client::DockerClient`, and `paths::get_images_path` [INFO] [stdout] --> src/utils.rs:11:208 [INFO] [stdout] | [INFO] [stdout] 11 | ...unmount_file}, docker_client::DockerClient, models::registry_models::{Manifest, Platform}, paths::get_images_path}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/utils.rs:110:121 [INFO] [stdout] | [INFO] [stdout] 110 | ...in("bootloader.img")).map_err(|e|{anyhow!("Failed to convert temp mount dir to utf8")})?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ApplicationState` [INFO] [stdout] --> src/application_state.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn new() -> ApplicationState { [INFO] [stdout] 37 | | ApplicationState { [INFO] [stdout] 38 | | tagged_images: HashMap::new(), [INFO] [stdout] 39 | | images: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 42 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 35 + impl Default for ApplicationState { [INFO] [stdout] 36 + fn default() -> Self { [INFO] [stdout] 37 + Self::new() [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/application_state.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | self.tagged_images.get(&key).and_then(|m|{Some(m.clone())}) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.tagged_images.get(&key).map(|m| m.clone())` [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: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/application_state.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | self.images.get(&digest).map(|i|{i.clone()}) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `self.images.get(&digest).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands.rs:25:49 [INFO] [stdout] | [INFO] [stdout] 25 | let oci_manifest = client.get_oci_manifest( &manifest.digest.as_str()).await?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `manifest.digest.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands.rs:61:21 [INFO] [stdout] | [INFO] [stdout] 61 | let is_latest = !args.outfile.is_some() && matches!(&stored_digest, Some(v) if v == &oci_manifest.config.digest); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `args.outfile.is_none()` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands.rs:57:48 [INFO] [stdout] | [INFO] [stdout] 57 | let oci_manifest = client.get_oci_manifest(&manifest.digest.as_str()).await?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `manifest.digest.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands.rs:71:52 [INFO] [stdout] | [INFO] [stdout] 71 | let image_config = client.get_image_config(&oci_manifest.config.digest.as_str()).await?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `oci_manifest.config.digest.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands.rs:83:13 [INFO] [stdout] | [INFO] [stdout] 83 | &bootloader_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `bootloader_path` [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: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/commands.rs:161:10 [INFO] [stdout] | [INFO] [stdout] 161 | .map(|a|{a.1.layers.clone()}) [INFO] [stdout] | __________^ [INFO] [stdout] 162 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|a|{a.1.layers.clone()})` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli_commands.rs:45:15 [INFO] [stdout] | [INFO] [stdout] 45 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 46 | | "if=/dev/zero", [INFO] [stdout] 47 | | format!("of={}", image_path.as_str()).as_str(), [INFO] [stdout] 48 | | "bs=4k", [INFO] [stdout] 49 | | format!("count={blocks}").as_str() [INFO] [stdout] 50 | | ]) [INFO] [stdout] | |_________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 45 ~ .args([ [INFO] [stdout] 46 + "if=/dev/zero", [INFO] [stdout] 47 + format!("of={}", image_path.as_str()).as_str(), [INFO] [stdout] 48 + "bs=4k", [INFO] [stdout] 49 + format!("count={blocks}").as_str() [INFO] [stdout] 50 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli_commands.rs:61:19 [INFO] [stdout] | [INFO] [stdout] 61 | .args(&[path.as_str()]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `[path.as_str()]` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/cli_commands.rs:68:31 [INFO] [stdout] | [INFO] [stdout] 68 | pub fn mount_file(image_path: &String, mount_path: &String) -> Result<()> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 68 ~ pub fn mount_file(image_path: &str, mount_path: &String) -> Result<()> { [INFO] [stdout] 69 | output_error_if_failed( [INFO] [stdout] ... [INFO] [stdout] 72 | "-t", "auto", [INFO] [stdout] 73 ~ image_path, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/cli_commands.rs:68:52 [INFO] [stdout] | [INFO] [stdout] 68 | pub fn mount_file(image_path: &String, mount_path: &String) -> Result<()> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 68 ~ pub fn mount_file(image_path: &String, mount_path: &str) -> Result<()> { [INFO] [stdout] 69 | output_error_if_failed( [INFO] [stdout] ... [INFO] [stdout] 73 | image_path.as_str(), [INFO] [stdout] 74 ~ mount_path [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli_commands.rs:71:19 [INFO] [stdout] | [INFO] [stdout] 71 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 72 | | "-t", "auto", [INFO] [stdout] 73 | | image_path.as_str(), [INFO] [stdout] 74 | | mount_path.as_str() [INFO] [stdout] 75 | | ]) [INFO] [stdout] | |_____________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 71 ~ .args([ [INFO] [stdout] 72 + "-t", "auto", [INFO] [stdout] 73 + image_path.as_str(), [INFO] [stdout] 74 + mount_path.as_str() [INFO] [stdout] 75 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli_commands.rs:84:19 [INFO] [stdout] | [INFO] [stdout] 84 | .args(&[mount_path.as_str()]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[mount_path.as_str()]` [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/cli_commands.rs:96:19 [INFO] [stdout] | [INFO] [stdout] 96 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 97 | | format!("if={}", bootloader_path.as_str()).as_str(), [INFO] [stdout] 98 | | format!("of={}", image_path.as_str()).as_str(), [INFO] [stdout] 99 | | "bs=440", [INFO] [stdout] 100 | | "count=1", [INFO] [stdout] 101 | | "conv=notrunc" [INFO] [stdout] 102 | | ]) [INFO] [stdout] | |_____________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 96 ~ .args([ [INFO] [stdout] 97 + format!("if={}", bootloader_path.as_str()).as_str(), [INFO] [stdout] 98 + format!("of={}", image_path.as_str()).as_str(), [INFO] [stdout] 99 + "bs=440", [INFO] [stdout] 100 + "count=1", [INFO] [stdout] 101 + "conv=notrunc" [INFO] [stdout] 102 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli_commands.rs:113:14 [INFO] [stdout] | [INFO] [stdout] 113 | .arg(&image_path) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `image_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli_commands.rs:133:19 [INFO] [stdout] | [INFO] [stdout] 133 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 134 | | "-f", [INFO] [stdout] 135 | | ]) [INFO] [stdout] | |_____________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 133 ~ .args([ [INFO] [stdout] 134 + "-f", [INFO] [stdout] 135 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/cli_commands.rs:142:40 [INFO] [stdout] | [INFO] [stdout] 142 | pub fn detach_loop_device(device_name: &String)-> Result<()> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 142 ~ pub fn detach_loop_device(device_name: &str)-> Result<()> { [INFO] [stdout] 143 | output_error_if_failed( [INFO] [stdout] ... [INFO] [stdout] 146 | "-d", [INFO] [stdout] 147 ~ device_name [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli_commands.rs:145:19 [INFO] [stdout] | [INFO] [stdout] 145 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 146 | | "-d", [INFO] [stdout] 147 | | device_name.as_str() [INFO] [stdout] 148 | | ]) [INFO] [stdout] | |_____________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 145 ~ .args([ [INFO] [stdout] 146 + "-d", [INFO] [stdout] 147 + device_name.as_str() [INFO] [stdout] 148 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli_commands.rs:158:19 [INFO] [stdout] | [INFO] [stdout] 158 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 159 | | "-o", &format!("{offset}"), [INFO] [stdout] 160 | | mount_path.as_str(), [INFO] [stdout] 161 | | image_path.as_str() [INFO] [stdout] 162 | | ]) [INFO] [stdout] | |_____________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 158 ~ .args([ [INFO] [stdout] 159 + "-o", &format!("{offset}"), [INFO] [stdout] 160 + mount_path.as_str(), [INFO] [stdout] 161 + image_path.as_str() [INFO] [stdout] 162 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/docker_client.rs:26:39 [INFO] [stdout] | [INFO] [stdout] 26 | pub async fn new_with_auth(image: &String) -> Result { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 26 ~ pub async fn new_with_auth(image: &str) -> Result { [INFO] [stdout] 27 | let mut namespace = String::from("library"); [INFO] [stdout] 28 ~ let mut image_name = image.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `errors.get(0)` [INFO] [stdout] --> src/docker_client.rs:69:52 [INFO] [stdout] | [INFO] [stdout] 69 | bail!("Error getting manifests: {:?}", errors.get(0).context("Errors present but empty")?.message); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `errors.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` 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/docker_client.rs:122:37 [INFO] [stdout] | [INFO] [stdout] 122 | self.download_layer(&digest, dest.as_path().as_std_path()).await?; [INFO] [stdout] | ^^^^^^^ help: change this to: `digest` [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: direct implementation of `ToString` [INFO] [stdout] --> src/models/input_models.rs:29:1 [INFO] [stdout] | [INFO] [stdout] 29 | / impl ToString for ImageArg { [INFO] [stdout] 30 | | fn to_string(&self) -> String { [INFO] [stdout] 31 | | format!("{}:{}", self.name, self.tag) [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/utils.rs:79:86 [INFO] [stdout] | [INFO] [stdout] 79 | pub fn create_drive_image(layers: &Vec, layers_path: &Path, bootloader_path: &String, image_path: &Utf8PathBuf) -> Result{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 79 - pub fn create_drive_image(layers: &Vec, layers_path: &Path, bootloader_path: &String, image_path: &Utf8PathBuf) -> Result{ [INFO] [stdout] 79 + pub fn create_drive_image(layers: &Vec, layers_path: &Path, bootloader_path: &str, image_path: &Utf8PathBuf) -> Result{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/utils.rs:85:46 [INFO] [stdout] | [INFO] [stdout] 85 | if image_path.exists() { fs::remove_file(&image_path)?;} [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `image_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils.rs:87:23 [INFO] [stdout] | [INFO] [stdout] 87 | decompress_layers(&layers, layers_path, temp_combined_dir.path())?; [INFO] [stdout] | ^^^^^^^ help: change this to: `layers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/utils.rs:88:50 [INFO] [stdout] | [INFO] [stdout] 88 | let mut image_size = fs_extra::dir::get_size(&temp_combined_dir.path())? * 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `temp_combined_dir.path()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils.rs:97:23 [INFO] [stdout] | [INFO] [stdout] 97 | create_disk_image(&image_path, blocks)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `image_path` [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/utils.rs:98:28 [INFO] [stdout] | [INFO] [stdout] 98 | create_partition_table(&image_path)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `image_path` [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/utils.rs:101:23 [INFO] [stdout] | [INFO] [stdout] 101 | mount_with_offset(&image_path, &loop_device, 1024 * 1024)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `image_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/utils.rs:113:92 [INFO] [stdout] | [INFO] [stdout] 113 | println!("Waiting to allow inspection of loop device {} and bootloader {}", loop_device.to_string(), target_bootloader_path.to_... [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/utils.rs:113:128 [INFO] [stdout] | [INFO] [stdout] 113 | ..., loop_device.to_string(), target_bootloader_path.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils.rs:120:21 [INFO] [stdout] | [INFO] [stdout] 120 | burn_bootloader(&image_path, &target_bootloader_path)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `image_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/utils.rs:110:121 [INFO] [stdout] | [INFO] [stdout] 110 | ...in("bootloader.img")).map_err(|e|{anyhow!("Failed to convert temp mount dir to utf8")})?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ApplicationState` [INFO] [stdout] --> src/application_state.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn new() -> ApplicationState { [INFO] [stdout] 37 | | ApplicationState { [INFO] [stdout] 38 | | tagged_images: HashMap::new(), [INFO] [stdout] 39 | | images: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 42 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 35 + impl Default for ApplicationState { [INFO] [stdout] 36 + fn default() -> Self { [INFO] [stdout] 37 + Self::new() [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/application_state.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | self.tagged_images.get(&key).and_then(|m|{Some(m.clone())}) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.tagged_images.get(&key).map(|m| m.clone())` [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: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/application_state.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | self.images.get(&digest).map(|i|{i.clone()}) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `self.images.get(&digest).cloned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands.rs:25:49 [INFO] [stdout] | [INFO] [stdout] 25 | let oci_manifest = client.get_oci_manifest( &manifest.digest.as_str()).await?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `manifest.digest.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/commands.rs:61:21 [INFO] [stdout] | [INFO] [stdout] 61 | let is_latest = !args.outfile.is_some() && matches!(&stored_digest, Some(v) if v == &oci_manifest.config.digest); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `args.outfile.is_none()` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands.rs:57:48 [INFO] [stdout] | [INFO] [stdout] 57 | let oci_manifest = client.get_oci_manifest(&manifest.digest.as_str()).await?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `manifest.digest.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands.rs:71:52 [INFO] [stdout] | [INFO] [stdout] 71 | let image_config = client.get_image_config(&oci_manifest.config.digest.as_str()).await?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `oci_manifest.config.digest.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/commands.rs:83:13 [INFO] [stdout] | [INFO] [stdout] 83 | &bootloader_path, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `bootloader_path` [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 import is redundant [INFO] [stdout] --> src/main.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | use tokio; [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: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/commands.rs:161:10 [INFO] [stdout] | [INFO] [stdout] 161 | .map(|a|{a.1.layers.clone()}) [INFO] [stdout] | __________^ [INFO] [stdout] 162 | | .flatten() [INFO] [stdout] | |__________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|a|{a.1.layers.clone()})` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli_commands.rs:45:15 [INFO] [stdout] | [INFO] [stdout] 45 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 46 | | "if=/dev/zero", [INFO] [stdout] 47 | | format!("of={}", image_path.as_str()).as_str(), [INFO] [stdout] 48 | | "bs=4k", [INFO] [stdout] 49 | | format!("count={blocks}").as_str() [INFO] [stdout] 50 | | ]) [INFO] [stdout] | |_________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 45 ~ .args([ [INFO] [stdout] 46 + "if=/dev/zero", [INFO] [stdout] 47 + format!("of={}", image_path.as_str()).as_str(), [INFO] [stdout] 48 + "bs=4k", [INFO] [stdout] 49 + format!("count={blocks}").as_str() [INFO] [stdout] 50 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli_commands.rs:61:19 [INFO] [stdout] | [INFO] [stdout] 61 | .args(&[path.as_str()]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `[path.as_str()]` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/cli_commands.rs:68:31 [INFO] [stdout] | [INFO] [stdout] 68 | pub fn mount_file(image_path: &String, mount_path: &String) -> Result<()> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 68 ~ pub fn mount_file(image_path: &str, mount_path: &String) -> Result<()> { [INFO] [stdout] 69 | output_error_if_failed( [INFO] [stdout] ... [INFO] [stdout] 72 | "-t", "auto", [INFO] [stdout] 73 ~ image_path, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/cli_commands.rs:68:52 [INFO] [stdout] | [INFO] [stdout] 68 | pub fn mount_file(image_path: &String, mount_path: &String) -> Result<()> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 68 ~ pub fn mount_file(image_path: &String, mount_path: &str) -> Result<()> { [INFO] [stdout] 69 | output_error_if_failed( [INFO] [stdout] ... [INFO] [stdout] 73 | image_path.as_str(), [INFO] [stdout] 74 ~ mount_path [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli_commands.rs:71:19 [INFO] [stdout] | [INFO] [stdout] 71 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 72 | | "-t", "auto", [INFO] [stdout] 73 | | image_path.as_str(), [INFO] [stdout] 74 | | mount_path.as_str() [INFO] [stdout] 75 | | ]) [INFO] [stdout] | |_____________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 71 ~ .args([ [INFO] [stdout] 72 + "-t", "auto", [INFO] [stdout] 73 + image_path.as_str(), [INFO] [stdout] 74 + mount_path.as_str() [INFO] [stdout] 75 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli_commands.rs:84:19 [INFO] [stdout] | [INFO] [stdout] 84 | .args(&[mount_path.as_str()]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[mount_path.as_str()]` [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/cli_commands.rs:96:19 [INFO] [stdout] | [INFO] [stdout] 96 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 97 | | format!("if={}", bootloader_path.as_str()).as_str(), [INFO] [stdout] 98 | | format!("of={}", image_path.as_str()).as_str(), [INFO] [stdout] 99 | | "bs=440", [INFO] [stdout] 100 | | "count=1", [INFO] [stdout] 101 | | "conv=notrunc" [INFO] [stdout] 102 | | ]) [INFO] [stdout] | |_____________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 96 ~ .args([ [INFO] [stdout] 97 + format!("if={}", bootloader_path.as_str()).as_str(), [INFO] [stdout] 98 + format!("of={}", image_path.as_str()).as_str(), [INFO] [stdout] 99 + "bs=440", [INFO] [stdout] 100 + "count=1", [INFO] [stdout] 101 + "conv=notrunc" [INFO] [stdout] 102 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli_commands.rs:113:14 [INFO] [stdout] | [INFO] [stdout] 113 | .arg(&image_path) [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `image_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli_commands.rs:133:19 [INFO] [stdout] | [INFO] [stdout] 133 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 134 | | "-f", [INFO] [stdout] 135 | | ]) [INFO] [stdout] | |_____________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 133 ~ .args([ [INFO] [stdout] 134 + "-f", [INFO] [stdout] 135 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/cli_commands.rs:142:40 [INFO] [stdout] | [INFO] [stdout] 142 | pub fn detach_loop_device(device_name: &String)-> Result<()> { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 142 ~ pub fn detach_loop_device(device_name: &str)-> Result<()> { [INFO] [stdout] 143 | output_error_if_failed( [INFO] [stdout] ... [INFO] [stdout] 146 | "-d", [INFO] [stdout] 147 ~ device_name [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli_commands.rs:145:19 [INFO] [stdout] | [INFO] [stdout] 145 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 146 | | "-d", [INFO] [stdout] 147 | | device_name.as_str() [INFO] [stdout] 148 | | ]) [INFO] [stdout] | |_____________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 145 ~ .args([ [INFO] [stdout] 146 + "-d", [INFO] [stdout] 147 + device_name.as_str() [INFO] [stdout] 148 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cli_commands.rs:158:19 [INFO] [stdout] | [INFO] [stdout] 158 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 159 | | "-o", &format!("{offset}"), [INFO] [stdout] 160 | | mount_path.as_str(), [INFO] [stdout] 161 | | image_path.as_str() [INFO] [stdout] 162 | | ]) [INFO] [stdout] | |_____________^ [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 158 ~ .args([ [INFO] [stdout] 159 + "-o", &format!("{offset}"), [INFO] [stdout] 160 + mount_path.as_str(), [INFO] [stdout] 161 + image_path.as_str() [INFO] [stdout] 162 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/docker_client.rs:26:39 [INFO] [stdout] | [INFO] [stdout] 26 | pub async fn new_with_auth(image: &String) -> Result { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 26 ~ pub async fn new_with_auth(image: &str) -> Result { [INFO] [stdout] 27 | let mut namespace = String::from("library"); [INFO] [stdout] 28 ~ let mut image_name = image.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `errors.get(0)` [INFO] [stdout] --> src/docker_client.rs:69:52 [INFO] [stdout] | [INFO] [stdout] 69 | bail!("Error getting manifests: {:?}", errors.get(0).context("Errors present but empty")?.message); [INFO] [stdout] | ^^^^^^^^^^^^^ help: try: `errors.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` 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/docker_client.rs:122:37 [INFO] [stdout] | [INFO] [stdout] 122 | self.download_layer(&digest, dest.as_path().as_std_path()).await?; [INFO] [stdout] | ^^^^^^^ help: change this to: `digest` [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: direct implementation of `ToString` [INFO] [stdout] --> src/models/input_models.rs:29:1 [INFO] [stdout] | [INFO] [stdout] 29 | / impl ToString for ImageArg { [INFO] [stdout] 30 | | fn to_string(&self) -> String { [INFO] [stdout] 31 | | format!("{}:{}", self.name, self.tag) [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: prefer implementing `Display` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl [INFO] [stdout] = note: `#[warn(clippy::to_string_trait_impl)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/main.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | use tokio; [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: `to_string` applied to a type that implements `Display` in `eprintln!` args [INFO] [stdout] --> src/main.rs:50:11 [INFO] [stdout] | [INFO] [stdout] 50 | }).to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> src/main.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let mut base_path_lock = BASE_PATH.write().map_err(|_|{anyhow::anyhow!("Failed to get state path lock")})?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> src/main.rs:72:71 [INFO] [stdout] | [INFO] [stdout] 72 | Command::Info(args) => whaledrive::commands::image_info(args).await, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 73 | Command::Build(args) => whaledrive::commands::build_image(args).await, [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] = note: `#[warn(clippy::await_holding_lock)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/utils.rs:79:86 [INFO] [stdout] | [INFO] [stdout] 79 | pub fn create_drive_image(layers: &Vec, layers_path: &Path, bootloader_path: &String, image_path: &Utf8PathBuf) -> Result{ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 79 - pub fn create_drive_image(layers: &Vec, layers_path: &Path, bootloader_path: &String, image_path: &Utf8PathBuf) -> Result{ [INFO] [stdout] 79 + pub fn create_drive_image(layers: &Vec, layers_path: &Path, bootloader_path: &str, image_path: &Utf8PathBuf) -> Result{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/utils.rs:85:46 [INFO] [stdout] | [INFO] [stdout] 85 | if image_path.exists() { fs::remove_file(&image_path)?;} [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `image_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils.rs:87:23 [INFO] [stdout] | [INFO] [stdout] 87 | decompress_layers(&layers, layers_path, temp_combined_dir.path())?; [INFO] [stdout] | ^^^^^^^ help: change this to: `layers` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/utils.rs:88:50 [INFO] [stdout] | [INFO] [stdout] 88 | let mut image_size = fs_extra::dir::get_size(&temp_combined_dir.path())? * 2; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `temp_combined_dir.path()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils.rs:97:23 [INFO] [stdout] | [INFO] [stdout] 97 | create_disk_image(&image_path, blocks)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `image_path` [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/utils.rs:98:28 [INFO] [stdout] | [INFO] [stdout] 98 | create_partition_table(&image_path)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `image_path` [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/utils.rs:101:23 [INFO] [stdout] | [INFO] [stdout] 101 | mount_with_offset(&image_path, &loop_device, 1024 * 1024)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `image_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/utils.rs:113:92 [INFO] [stdout] | [INFO] [stdout] 113 | println!("Waiting to allow inspection of loop device {} and bootloader {}", loop_device.to_string(), target_bootloader_path.to_... [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `println!` args [INFO] [stdout] --> src/utils.rs:113:128 [INFO] [stdout] | [INFO] [stdout] 113 | ..., loop_device.to_string(), target_bootloader_path.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/utils.rs:120:21 [INFO] [stdout] | [INFO] [stdout] 120 | burn_bootloader(&image_path, &target_bootloader_path)?; [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `image_path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `eprintln!` args [INFO] [stdout] --> src/main.rs:50:11 [INFO] [stdout] | [INFO] [stdout] 50 | }).to_string()) [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `MutexGuard` is held across an await point [INFO] [stdout] --> src/main.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let mut base_path_lock = BASE_PATH.write().map_err(|_|{anyhow::anyhow!("Failed to get state path lock")})?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling `await` [INFO] [stdout] note: these are all the await points this lock is held through [INFO] [stdout] --> src/main.rs:72:71 [INFO] [stdout] | [INFO] [stdout] 72 | Command::Info(args) => whaledrive::commands::image_info(args).await, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 73 | Command::Build(args) => whaledrive::commands::build_image(args).await, [INFO] [stdout] | ^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock [INFO] [stdout] = note: `#[warn(clippy::await_holding_lock)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 00s [INFO] running `Command { std: "docker" "inspect" "77a492273da95aa9acd08c69520345d1bffd0dd56358e939a3f89f039a61d02a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "77a492273da95aa9acd08c69520345d1bffd0dd56358e939a3f89f039a61d02a", kill_on_drop: false }` [INFO] [stdout] 77a492273da95aa9acd08c69520345d1bffd0dd56358e939a3f89f039a61d02a