[INFO] cloning repository https://github.com/AndreRimes/rustainer [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/AndreRimes/rustainer" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAndreRimes%2Frustainer", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAndreRimes%2Frustainer'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8887d6a1a173e3621bf9c19b213a27bca57ef2cf [INFO] linting AndreRimes/rustainer against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FAndreRimes%2Frustainer" "/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/AndreRimes/rustainer [INFO] finished tweaking git repo https://github.com/AndreRimes/rustainer [INFO] tweaked toml for git repo https://github.com/AndreRimes/rustainer written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/AndreRimes/rustainer 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/AndreRimes/rustainer 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] Downloading crates ... [INFO] [stderr] Downloaded xattr v1.5.1 [INFO] [stderr] Downloaded cc v1.2.27 [INFO] [stderr] Downloaded tokio v1.46.0 [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] 825f7ddd0de17f060f53a6bb05199263935cadf5f53357b57e11be1f2e611379 [INFO] running `Command { std: "docker" "start" "-a" "825f7ddd0de17f060f53a6bb05199263935cadf5f53357b57e11be1f2e611379", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "825f7ddd0de17f060f53a6bb05199263935cadf5f53357b57e11be1f2e611379", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "825f7ddd0de17f060f53a6bb05199263935cadf5f53357b57e11be1f2e611379", kill_on_drop: false }` [INFO] [stdout] 825f7ddd0de17f060f53a6bb05199263935cadf5f53357b57e11be1f2e611379 [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] 1163433d373e9067b4bde7e6841959b4e4db44edb98ac64255d3292f4900948e [INFO] running `Command { std: "docker" "start" "-a" "1163433d373e9067b4bde7e6841959b4e4db44edb98ac64255d3292f4900948e", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.95 [INFO] [stderr] Compiling unicode-ident v1.0.18 [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Checking cfg-if v1.0.1 [INFO] [stderr] Checking stable_deref_trait v1.2.0 [INFO] [stderr] Checking smallvec v1.15.1 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Compiling cc v1.2.27 [INFO] [stderr] Compiling parking_lot_core v0.9.11 [INFO] [stderr] Checking litemap v0.8.0 [INFO] [stderr] Checking bitflags v2.9.1 [INFO] [stderr] Checking writeable v0.6.1 [INFO] [stderr] Compiling icu_normalizer_data v2.0.0 [INFO] [stderr] Compiling typenum v1.18.0 [INFO] [stderr] Compiling icu_properties_data v2.0.1 [INFO] [stderr] Compiling openssl v0.10.73 [INFO] [stderr] Checking http v0.2.12 [INFO] [stderr] Checking hashbrown v0.15.4 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling syn v2.0.104 [INFO] [stderr] Checking percent-encoding v2.3.1 [INFO] [stderr] Checking log v0.4.27 [INFO] [stderr] Compiling rustix v1.0.7 [INFO] [stderr] Checking indexmap v2.10.0 [INFO] [stderr] Checking slab v0.4.10 [INFO] [stderr] Checking generic-array v0.14.7 [INFO] [stderr] Checking form_urlencoded v1.2.1 [INFO] [stderr] Checking signal-hook-registry v1.4.5 [INFO] [stderr] Checking socket2 v0.5.10 [INFO] [stderr] Compiling openssl-sys v0.9.109 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking http-body v0.4.6 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Checking linux-raw-sys v0.9.4 [INFO] [stderr] Checking httpdate v1.0.3 [INFO] [stderr] Checking is_terminal_polyfill v1.70.1 [INFO] [stderr] Compiling native-tls v0.2.14 [INFO] [stderr] Checking anstyle v1.0.11 [INFO] [stderr] Checking anstyle-query v1.1.3 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Checking memchr v2.7.5 [INFO] [stderr] Checking clap_lex v0.7.5 [INFO] [stderr] Checking miniz_oxide v0.8.9 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking anstream v0.6.19 [INFO] [stderr] Checking rustls-pemfile v1.0.4 [INFO] [stderr] Checking filetime v0.2.25 [INFO] [stderr] Checking crc32fast v1.4.2 [INFO] [stderr] Checking encoding_rs v0.8.35 [INFO] [stderr] Checking sync_wrapper v0.1.2 [INFO] [stderr] Checking clap_builder v4.5.40 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking flate2 v1.1.2 [INFO] [stderr] Checking xattr v1.5.1 [INFO] [stderr] Checking tar v0.4.44 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling clap_derive v4.5.40 [INFO] [stderr] Checking tokio v1.46.0 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking zerovec v0.11.2 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Checking clap v4.5.40 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.2 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking tokio-util v0.7.15 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking serde_json v1.0.140 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking h2 v0.3.26 [INFO] [stderr] Checking hyper v0.14.32 [INFO] [stderr] Checking hyper-tls v0.5.0 [INFO] [stderr] Checking reqwest v0.11.27 [INFO] [stderr] Checking rustainer v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: fields `name`, `interactive`, `tty`, and `volumes` are never read [INFO] [stdout] --> src/actions/run.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct RunConfig { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 12 | pub image: String, [INFO] [stdout] 13 | pub name: Option, [INFO] [stdout] | ^^^^ [INFO] [stdout] 14 | pub detach: bool, [INFO] [stdout] 15 | pub interactive: bool, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 16 | pub tty: bool, [INFO] [stdout] | ^^^ [INFO] [stdout] 17 | pub env_vars: Vec, [INFO] [stdout] 18 | pub volumes: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `RunConfig` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `working_dir` and `user` are never read [INFO] [stdout] --> src/actions/run.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 24 | struct ImageConfig { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 32 | working_dir: String, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 33 | #[serde(rename = "User", default)] [INFO] [stdout] 34 | user: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ImageConfig` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `interactive`, `tty`, and `volumes` are never read [INFO] [stdout] --> src/actions/run.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct RunConfig { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 12 | pub image: String, [INFO] [stdout] 13 | pub name: Option, [INFO] [stdout] | ^^^^ [INFO] [stdout] 14 | pub detach: bool, [INFO] [stdout] 15 | pub interactive: bool, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 16 | pub tty: bool, [INFO] [stdout] | ^^^ [INFO] [stdout] 17 | pub env_vars: Vec, [INFO] [stdout] 18 | pub volumes: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `RunConfig` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `working_dir` and `user` are never read [INFO] [stdout] --> src/actions/run.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 24 | struct ImageConfig { [INFO] [stdout] | ----------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 32 | working_dir: String, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] 33 | #[serde(rename = "User", default)] [INFO] [stdout] 34 | user: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ImageConfig` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/actions/ls.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | if !fs::metadata(containers_dir).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(containers_dir).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: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/actions/ls.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | / for entry in entries { [INFO] [stdout] 20 | | if let Ok(entry) = entry { [INFO] [stdout] 21 | | let container_id = entry.file_name().to_string_lossy().to_string(); [INFO] [stdout] ... | [INFO] [stdout] 82 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/actions/ls.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | / if let Ok(entry) = entry { [INFO] [stdout] 21 | | let container_id = entry.file_name().to_string_lossy().to_string(); [INFO] [stdout] 22 | | [INFO] [stdout] 23 | | let status = Command::new("ip").args(&["netns", "list"]).output()?; [INFO] [stdout] ... | [INFO] [stdout] 80 | | ); [INFO] [stdout] 81 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 19 ~ for entry in entries.flatten() { [INFO] [stdout] 20 + let container_id = entry.file_name().to_string_lossy().to_string(); [INFO] [stdout] 21 + [INFO] [stdout] 22 + let status = Command::new("ip").args(&["netns", "list"]).output()?; [INFO] [stdout] 23 + [INFO] [stdout] 24 + let netns_output = String::from_utf8_lossy(&status.stdout); [INFO] [stdout] 25 + let is_running = netns_output.contains(&container_id); [INFO] [stdout] 26 + [INFO] [stdout] 27 + let timestamp_part = container_id.strip_prefix("rustainer_").unwrap_or("0"); [INFO] [stdout] 28 + let timestamp = timestamp_part.parse::().unwrap_or(0); [INFO] [stdout] 29 + [INFO] [stdout] 30 + let now = SystemTime::now() [INFO] [stdout] 31 + .duration_since(UNIX_EPOCH) [INFO] [stdout] 32 + .unwrap() [INFO] [stdout] 33 + .as_secs(); [INFO] [stdout] 34 + let elapsed_secs = now.saturating_sub(timestamp); [INFO] [stdout] 35 + let created = if elapsed_secs < 60 { [INFO] [stdout] 36 + format!("{}s ago", elapsed_secs) [INFO] [stdout] 37 + } else if elapsed_secs < 3600 { [INFO] [stdout] 38 + format!("{}m ago", elapsed_secs / 60) [INFO] [stdout] 39 + } else if elapsed_secs < 86400 { [INFO] [stdout] 40 + format!("{}h ago", elapsed_secs / 3600) [INFO] [stdout] 41 + } else { [INFO] [stdout] 42 + format!("{}d ago", elapsed_secs / 86400) [INFO] [stdout] 43 + }; [INFO] [stdout] 44 + let mut image = "N/A".to_string(); [INFO] [stdout] 45 + let mut command = "N/A".to_string(); [INFO] [stdout] 46 + let mut ports = "N/A".to_string(); [INFO] [stdout] 47 + [INFO] [stdout] 48 + let metadata_path = format!("{}/{}/metadata.json", containers_dir, container_id); [INFO] [stdout] 49 + [INFO] [stdout] 50 + let metadata_content = fs::read_to_string(&metadata_path); [INFO] [stdout] 51 + [INFO] [stdout] 52 + if let Ok(content) = metadata_content { [INFO] [stdout] 53 + if let Ok(metadata) = serde_json::from_str::(&content) { [INFO] [stdout] 54 + if let Some(img) = metadata.get("image").and_then(|v| v.as_str()) { [INFO] [stdout] 55 + image = img.to_string(); [INFO] [stdout] 56 + } [INFO] [stdout] 57 + if let Some(cmd) = metadata.get("command").and_then(|v| v.as_str()) { [INFO] [stdout] 58 + command = cmd.to_string(); [INFO] [stdout] 59 + } [INFO] [stdout] 60 + if let Some(port_array) = metadata.get("ports").and_then(|v| v.as_array()) { [INFO] [stdout] 61 + if !port_array.is_empty() { [INFO] [stdout] 62 + let port_strs: Vec = port_array [INFO] [stdout] 63 + .iter() [INFO] [stdout] 64 + .filter_map(|p| p.as_str().map(String::from)) [INFO] [stdout] 65 + .collect(); [INFO] [stdout] 66 + if !port_strs.is_empty() { [INFO] [stdout] 67 + ports = port_strs.join(", "); [INFO] [stdout] 68 + } [INFO] [stdout] 69 + } [INFO] [stdout] 70 + } [INFO] [stdout] 71 + } [INFO] [stdout] 72 + } [INFO] [stdout] 73 + [INFO] [stdout] 74 + let status_str = if is_running { "Up" } else { "Exited" }; [INFO] [stdout] 75 + [INFO] [stdout] 76 + println!( [INFO] [stdout] 77 + "{}\t{}\t{}\t{}\t{}\t{}", [INFO] [stdout] 78 + container_id, image, command, created, status_str, ports [INFO] [stdout] 79 + ); [INFO] [stdout] 80 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/ls.rs:23:50 [INFO] [stdout] | [INFO] [stdout] 23 | let status = Command::new("ip").args(&["netns", "list"]).output()?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `["netns", "list"]` [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: this boolean expression can be simplified [INFO] [stdout] --> src/actions/ls.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | if !fs::metadata(containers_dir).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(containers_dir).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: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/actions/ls.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | / for entry in entries { [INFO] [stdout] 20 | | if let Ok(entry) = entry { [INFO] [stdout] 21 | | let container_id = entry.file_name().to_string_lossy().to_string(); [INFO] [stdout] ... | [INFO] [stdout] 82 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/actions/ls.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | / if let Ok(entry) = entry { [INFO] [stdout] 21 | | let container_id = entry.file_name().to_string_lossy().to_string(); [INFO] [stdout] 22 | | [INFO] [stdout] 23 | | let status = Command::new("ip").args(&["netns", "list"]).output()?; [INFO] [stdout] ... | [INFO] [stdout] 80 | | ); [INFO] [stdout] 81 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 19 ~ for entry in entries.flatten() { [INFO] [stdout] 20 + let container_id = entry.file_name().to_string_lossy().to_string(); [INFO] [stdout] 21 + [INFO] [stdout] 22 + let status = Command::new("ip").args(&["netns", "list"]).output()?; [INFO] [stdout] 23 + [INFO] [stdout] 24 + let netns_output = String::from_utf8_lossy(&status.stdout); [INFO] [stdout] 25 + let is_running = netns_output.contains(&container_id); [INFO] [stdout] 26 + [INFO] [stdout] 27 + let timestamp_part = container_id.strip_prefix("rustainer_").unwrap_or("0"); [INFO] [stdout] 28 + let timestamp = timestamp_part.parse::().unwrap_or(0); [INFO] [stdout] 29 + [INFO] [stdout] 30 + let now = SystemTime::now() [INFO] [stdout] 31 + .duration_since(UNIX_EPOCH) [INFO] [stdout] 32 + .unwrap() [INFO] [stdout] 33 + .as_secs(); [INFO] [stdout] 34 + let elapsed_secs = now.saturating_sub(timestamp); [INFO] [stdout] 35 + let created = if elapsed_secs < 60 { [INFO] [stdout] 36 + format!("{}s ago", elapsed_secs) [INFO] [stdout] 37 + } else if elapsed_secs < 3600 { [INFO] [stdout] 38 + format!("{}m ago", elapsed_secs / 60) [INFO] [stdout] 39 + } else if elapsed_secs < 86400 { [INFO] [stdout] 40 + format!("{}h ago", elapsed_secs / 3600) [INFO] [stdout] 41 + } else { [INFO] [stdout] 42 + format!("{}d ago", elapsed_secs / 86400) [INFO] [stdout] 43 + }; [INFO] [stdout] 44 + let mut image = "N/A".to_string(); [INFO] [stdout] 45 + let mut command = "N/A".to_string(); [INFO] [stdout] 46 + let mut ports = "N/A".to_string(); [INFO] [stdout] 47 + [INFO] [stdout] 48 + let metadata_path = format!("{}/{}/metadata.json", containers_dir, container_id); [INFO] [stdout] 49 + [INFO] [stdout] 50 + let metadata_content = fs::read_to_string(&metadata_path); [INFO] [stdout] 51 + [INFO] [stdout] 52 + if let Ok(content) = metadata_content { [INFO] [stdout] 53 + if let Ok(metadata) = serde_json::from_str::(&content) { [INFO] [stdout] 54 + if let Some(img) = metadata.get("image").and_then(|v| v.as_str()) { [INFO] [stdout] 55 + image = img.to_string(); [INFO] [stdout] 56 + } [INFO] [stdout] 57 + if let Some(cmd) = metadata.get("command").and_then(|v| v.as_str()) { [INFO] [stdout] 58 + command = cmd.to_string(); [INFO] [stdout] 59 + } [INFO] [stdout] 60 + if let Some(port_array) = metadata.get("ports").and_then(|v| v.as_array()) { [INFO] [stdout] 61 + if !port_array.is_empty() { [INFO] [stdout] 62 + let port_strs: Vec = port_array [INFO] [stdout] 63 + .iter() [INFO] [stdout] 64 + .filter_map(|p| p.as_str().map(String::from)) [INFO] [stdout] 65 + .collect(); [INFO] [stdout] 66 + if !port_strs.is_empty() { [INFO] [stdout] 67 + ports = port_strs.join(", "); [INFO] [stdout] 68 + } [INFO] [stdout] 69 + } [INFO] [stdout] 70 + } [INFO] [stdout] 71 + } [INFO] [stdout] 72 + } [INFO] [stdout] 73 + [INFO] [stdout] 74 + let status_str = if is_running { "Up" } else { "Exited" }; [INFO] [stdout] 75 + [INFO] [stdout] 76 + println!( [INFO] [stdout] 77 + "{}\t{}\t{}\t{}\t{}\t{}", [INFO] [stdout] 78 + container_id, image, command, created, status_str, ports [INFO] [stdout] 79 + ); [INFO] [stdout] 80 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/ls.rs:23:50 [INFO] [stdout] | [INFO] [stdout] 23 | let status = Command::new("ip").args(&["netns", "list"]).output()?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `["netns", "list"]` [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: this boolean expression can be simplified [INFO] [stdout] --> src/actions/rm.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | if !fs::metadata(&container_dir).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(&container_dir).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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/actions/rm.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | if !fs::metadata(&container_dir).is_ok() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `fs::metadata(&container_dir).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] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/rm.rs:45:23 [INFO] [stdout] | [INFO] [stdout] 45 | .args(&[ [INFO] [stdout] | _______________________^ [INFO] [stdout] 46 | | "-t", [INFO] [stdout] 47 | | "nat", [INFO] [stdout] 48 | | "-D", [INFO] [stdout] ... | [INFO] [stdout] 55 | | "DNAT", [INFO] [stdout] 56 | | ]) [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] 45 ~ .args([ [INFO] [stdout] 46 + "-t", [INFO] [stdout] 47 + "nat", [INFO] [stdout] 48 + "-D", [INFO] [stdout] 49 + "PREROUTING", [INFO] [stdout] 50 + "-p", [INFO] [stdout] 51 + "tcp", [INFO] [stdout] 52 + "--dport", [INFO] [stdout] 53 + host_port, [INFO] [stdout] 54 + "-j", [INFO] [stdout] 55 + "DNAT", [INFO] [stdout] 56 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/rm.rs:60:23 [INFO] [stdout] | [INFO] [stdout] 60 | .args(&[ [INFO] [stdout] | _______________________^ [INFO] [stdout] 61 | | "-t", "nat", "-D", "OUTPUT", "-p", "tcp", "--dport", host_port, "-j", "DNAT", [INFO] [stdout] 62 | | ]) [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] 60 ~ .args([ [INFO] [stdout] 61 + "-t", "nat", "-D", "OUTPUT", "-p", "tcp", "--dport", host_port, "-j", "DNAT", [INFO] [stdout] 62 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/rm.rs:67:42 [INFO] [stdout] | [INFO] [stdout] 67 | let output = Command::new("ip").args(&["netns", "list"]).output()?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `["netns", "list"]` [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/actions/rm.rs:73:19 [INFO] [stdout] | [INFO] [stdout] 73 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 74 | | "--net=/var/run/netns/", [INFO] [stdout] 75 | | container_id, [INFO] [stdout] 76 | | "--", [INFO] [stdout] 77 | | "killall5", [INFO] [stdout] 78 | | "-9", [INFO] [stdout] 79 | | ]) [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] 73 ~ .args([ [INFO] [stdout] 74 + "--net=/var/run/netns/", [INFO] [stdout] 75 + container_id, [INFO] [stdout] 76 + "--", [INFO] [stdout] 77 + "killall5", [INFO] [stdout] 78 + "-9", [INFO] [stdout] 79 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/rm.rs:82:49 [INFO] [stdout] | [INFO] [stdout] 82 | let ps_output = Command::new("ps").args(&["-ef"]).output()?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `["-ef"]` [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/actions/rm.rs:100:23 [INFO] [stdout] | [INFO] [stdout] 100 | .args(&["-9", "-", pid]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `["-9", "-", pid]` [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/actions/rm.rs:45:23 [INFO] [stdout] | [INFO] [stdout] 45 | .args(&[ [INFO] [stdout] | _______________________^ [INFO] [stdout] 46 | | "-t", [INFO] [stdout] 47 | | "nat", [INFO] [stdout] 48 | | "-D", [INFO] [stdout] ... | [INFO] [stdout] 55 | | "DNAT", [INFO] [stdout] 56 | | ]) [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] 45 ~ .args([ [INFO] [stdout] 46 + "-t", [INFO] [stdout] 47 + "nat", [INFO] [stdout] 48 + "-D", [INFO] [stdout] 49 + "PREROUTING", [INFO] [stdout] 50 + "-p", [INFO] [stdout] 51 + "tcp", [INFO] [stdout] 52 + "--dport", [INFO] [stdout] 53 + host_port, [INFO] [stdout] 54 + "-j", [INFO] [stdout] 55 + "DNAT", [INFO] [stdout] 56 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/rm.rs:103:47 [INFO] [stdout] | [INFO] [stdout] 103 | let _ = Command::new("kill").args(&["-9", pid]).output()?; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `["-9", pid]` [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/actions/rm.rs:60:23 [INFO] [stdout] | [INFO] [stdout] 60 | .args(&[ [INFO] [stdout] | _______________________^ [INFO] [stdout] 61 | | "-t", "nat", "-D", "OUTPUT", "-p", "tcp", "--dport", host_port, "-j", "DNAT", [INFO] [stdout] 62 | | ]) [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] 60 ~ .args([ [INFO] [stdout] 61 + "-t", "nat", "-D", "OUTPUT", "-p", "tcp", "--dport", host_port, "-j", "DNAT", [INFO] [stdout] 62 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/rm.rs:109:19 [INFO] [stdout] | [INFO] [stdout] 109 | .args(&["netns", "delete", container_id]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["netns", "delete", container_id]` [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/actions/rm.rs:67:42 [INFO] [stdout] | [INFO] [stdout] 67 | let output = Command::new("ip").args(&["netns", "list"]).output()?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `["netns", "list"]` [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/actions/rm.rs:113:43 [INFO] [stdout] | [INFO] [stdout] 113 | let _ = Command::new("iptables").args(&["-F", "FORWARD"]).output(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `["-F", "FORWARD"]` [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/actions/rm.rs:73:19 [INFO] [stdout] | [INFO] [stdout] 73 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 74 | | "--net=/var/run/netns/", [INFO] [stdout] 75 | | container_id, [INFO] [stdout] 76 | | "--", [INFO] [stdout] 77 | | "killall5", [INFO] [stdout] 78 | | "-9", [INFO] [stdout] 79 | | ]) [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] 73 ~ .args([ [INFO] [stdout] 74 + "--net=/var/run/netns/", [INFO] [stdout] 75 + container_id, [INFO] [stdout] 76 + "--", [INFO] [stdout] 77 + "killall5", [INFO] [stdout] 78 + "-9", [INFO] [stdout] 79 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/rm.rs:82:49 [INFO] [stdout] | [INFO] [stdout] 82 | let ps_output = Command::new("ps").args(&["-ef"]).output()?; [INFO] [stdout] | ^^^^^^^^ help: change this to: `["-ef"]` [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/actions/rm.rs:100:23 [INFO] [stdout] | [INFO] [stdout] 100 | .args(&["-9", "-", pid]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `["-9", "-", pid]` [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/actions/rm.rs:103:47 [INFO] [stdout] | [INFO] [stdout] 103 | let _ = Command::new("kill").args(&["-9", pid]).output()?; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `["-9", pid]` [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/actions/rm.rs:109:19 [INFO] [stdout] | [INFO] [stdout] 109 | .args(&["netns", "delete", container_id]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["netns", "delete", container_id]` [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/actions/rm.rs:113:43 [INFO] [stdout] | [INFO] [stdout] 113 | let _ = Command::new("iptables").args(&["-F", "FORWARD"]).output(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `["-F", "FORWARD"]` [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/actions/run.rs:161:15 [INFO] [stdout] | [INFO] [stdout] 161 | .args(&["-w", "net.ipv4.ip_forward=1"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-w", "net.ipv4.ip_forward=1"]` [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/actions/run.rs:188:15 [INFO] [stdout] | [INFO] [stdout] 188 | .args(&["netns", "add", container_id]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["netns", "add", container_id]` [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/actions/run.rs:206:15 [INFO] [stdout] | [INFO] [stdout] 206 | .args(&["link", "show", host_name]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["link", "show", host_name]` [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/actions/run.rs:214:15 [INFO] [stdout] | [INFO] [stdout] 214 | .args(&["link", "add", host_name, "type", "bridge"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["link", "add", host_name, "type", "bridge"]` [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/actions/run.rs:161:15 [INFO] [stdout] | [INFO] [stdout] 161 | .args(&["-w", "net.ipv4.ip_forward=1"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["-w", "net.ipv4.ip_forward=1"]` [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/actions/run.rs:226:15 [INFO] [stdout] | [INFO] [stdout] 226 | .args(&["link", "set", "dev", host_name, "up"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["link", "set", "dev", host_name, "up"]` [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/actions/run.rs:188:15 [INFO] [stdout] | [INFO] [stdout] 188 | .args(&["netns", "add", container_id]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["netns", "add", container_id]` [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/actions/run.rs:206:15 [INFO] [stdout] | [INFO] [stdout] 206 | .args(&["link", "show", host_name]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["link", "show", host_name]` [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/actions/run.rs:214:15 [INFO] [stdout] | [INFO] [stdout] 214 | .args(&["link", "add", host_name, "type", "bridge"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["link", "add", host_name, "type", "bridge"]` [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/actions/run.rs:257:15 [INFO] [stdout] | [INFO] [stdout] 257 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 258 | | "link", [INFO] [stdout] 259 | | "add", [INFO] [stdout] 260 | | &container_veth, [INFO] [stdout] ... | [INFO] [stdout] 265 | | &host_veth, [INFO] [stdout] 266 | | ]) [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] 257 ~ .args([ [INFO] [stdout] 258 + "link", [INFO] [stdout] 259 + "add", [INFO] [stdout] 260 + &container_veth, [INFO] [stdout] 261 + "type", [INFO] [stdout] 262 + "veth", [INFO] [stdout] 263 + "peer", [INFO] [stdout] 264 + "name", [INFO] [stdout] 265 + &host_veth, [INFO] [stdout] 266 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:226:15 [INFO] [stdout] | [INFO] [stdout] 226 | .args(&["link", "set", "dev", host_name, "up"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["link", "set", "dev", host_name, "up"]` [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/actions/run.rs:278:15 [INFO] [stdout] | [INFO] [stdout] 278 | .args(&["link", "set", &container_veth, "netns", container_id]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["link", "set", &container_veth, "netns", container_id]` [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/actions/run.rs:290:15 [INFO] [stdout] | [INFO] [stdout] 290 | .args(&["link", "set", &host_veth, "master", "rustainer0"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["link", "set", &host_veth, "master", "rustainer0"]` [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/actions/run.rs:257:15 [INFO] [stdout] | [INFO] [stdout] 257 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 258 | | "link", [INFO] [stdout] 259 | | "add", [INFO] [stdout] 260 | | &container_veth, [INFO] [stdout] ... | [INFO] [stdout] 265 | | &host_veth, [INFO] [stdout] 266 | | ]) [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] 257 ~ .args([ [INFO] [stdout] 258 + "link", [INFO] [stdout] 259 + "add", [INFO] [stdout] 260 + &container_veth, [INFO] [stdout] 261 + "type", [INFO] [stdout] 262 + "veth", [INFO] [stdout] 263 + "peer", [INFO] [stdout] 264 + "name", [INFO] [stdout] 265 + &host_veth, [INFO] [stdout] 266 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:302:15 [INFO] [stdout] | [INFO] [stdout] 302 | .args(&["link", "set", &host_veth, "up"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["link", "set", &host_veth, "up"]` [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/actions/run.rs:278:15 [INFO] [stdout] | [INFO] [stdout] 278 | .args(&["link", "set", &container_veth, "netns", container_id]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["link", "set", &container_veth, "netns", container_id]` [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/actions/run.rs:326:15 [INFO] [stdout] | [INFO] [stdout] 326 | .args(&["addr", "show", "dev", "rustainer0"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["addr", "show", "dev", "rustainer0"]` [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/actions/run.rs:290:15 [INFO] [stdout] | [INFO] [stdout] 290 | .args(&["link", "set", &host_veth, "master", "rustainer0"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["link", "set", &host_veth, "master", "rustainer0"]` [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/actions/run.rs:331:19 [INFO] [stdout] | [INFO] [stdout] 331 | .args(&["addr", "add", "172.19.0.1/16", "dev", "rustainer0"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["addr", "add", "172.19.0.1/16", "dev", "rustainer0"]` [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/actions/run.rs:302:15 [INFO] [stdout] | [INFO] [stdout] 302 | .args(&["link", "set", &host_veth, "up"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["link", "set", &host_veth, "up"]` [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/actions/run.rs:326:15 [INFO] [stdout] | [INFO] [stdout] 326 | .args(&["addr", "show", "dev", "rustainer0"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["addr", "show", "dev", "rustainer0"]` [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/actions/run.rs:331:19 [INFO] [stdout] | [INFO] [stdout] 331 | .args(&["addr", "add", "172.19.0.1/16", "dev", "rustainer0"]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["addr", "add", "172.19.0.1/16", "dev", "rustainer0"]` [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/actions/run.rs:347:15 [INFO] [stdout] | [INFO] [stdout] 347 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 348 | | "netns", [INFO] [stdout] 349 | | "exec", [INFO] [stdout] 350 | | container_id, [INFO] [stdout] ... | [INFO] [stdout] 356 | | veth_container, [INFO] [stdout] 357 | | ]) [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] 347 ~ .args([ [INFO] [stdout] 348 + "netns", [INFO] [stdout] 349 + "exec", [INFO] [stdout] 350 + container_id, [INFO] [stdout] 351 + "ip", [INFO] [stdout] 352 + "addr", [INFO] [stdout] 353 + "add", [INFO] [stdout] 354 + &format!("{}/16", container_ip), [INFO] [stdout] 355 + "dev", [INFO] [stdout] 356 + veth_container, [INFO] [stdout] 357 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:369:15 [INFO] [stdout] | [INFO] [stdout] 369 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 370 | | "netns", [INFO] [stdout] 371 | | "exec", [INFO] [stdout] 372 | | container_id, [INFO] [stdout] ... | [INFO] [stdout] 377 | | "up", [INFO] [stdout] 378 | | ]) [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] 369 ~ .args([ [INFO] [stdout] 370 + "netns", [INFO] [stdout] 371 + "exec", [INFO] [stdout] 372 + container_id, [INFO] [stdout] 373 + "ip", [INFO] [stdout] 374 + "link", [INFO] [stdout] 375 + "set", [INFO] [stdout] 376 + veth_container, [INFO] [stdout] 377 + "up", [INFO] [stdout] 378 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:389:15 [INFO] [stdout] | [INFO] [stdout] 389 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 390 | | "netns", [INFO] [stdout] 391 | | "exec", [INFO] [stdout] 392 | | container_id, [INFO] [stdout] ... | [INFO] [stdout] 398 | | "172.19.0.1", [INFO] [stdout] 399 | | ]) [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] 389 ~ .args([ [INFO] [stdout] 390 + "netns", [INFO] [stdout] 391 + "exec", [INFO] [stdout] 392 + container_id, [INFO] [stdout] 393 + "ip", [INFO] [stdout] 394 + "route", [INFO] [stdout] 395 + "add", [INFO] [stdout] 396 + "default", [INFO] [stdout] 397 + "via", [INFO] [stdout] 398 + "172.19.0.1", [INFO] [stdout] 399 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:347:15 [INFO] [stdout] | [INFO] [stdout] 347 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 348 | | "netns", [INFO] [stdout] 349 | | "exec", [INFO] [stdout] 350 | | container_id, [INFO] [stdout] ... | [INFO] [stdout] 356 | | veth_container, [INFO] [stdout] 357 | | ]) [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] 347 ~ .args([ [INFO] [stdout] 348 + "netns", [INFO] [stdout] 349 + "exec", [INFO] [stdout] 350 + container_id, [INFO] [stdout] 351 + "ip", [INFO] [stdout] 352 + "addr", [INFO] [stdout] 353 + "add", [INFO] [stdout] 354 + &format!("{}/16", container_ip), [INFO] [stdout] 355 + "dev", [INFO] [stdout] 356 + veth_container, [INFO] [stdout] 357 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:418:15 [INFO] [stdout] | [INFO] [stdout] 418 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 419 | | "netns", [INFO] [stdout] 420 | | "exec", [INFO] [stdout] 421 | | container_id, [INFO] [stdout] ... | [INFO] [stdout] 426 | | "up", [INFO] [stdout] 427 | | ]) [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] 418 ~ .args([ [INFO] [stdout] 419 + "netns", [INFO] [stdout] 420 + "exec", [INFO] [stdout] 421 + container_id, [INFO] [stdout] 422 + "ip", [INFO] [stdout] 423 + "link", [INFO] [stdout] 424 + "set", [INFO] [stdout] 425 + "lo", [INFO] [stdout] 426 + "up", [INFO] [stdout] 427 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:369:15 [INFO] [stdout] | [INFO] [stdout] 369 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 370 | | "netns", [INFO] [stdout] 371 | | "exec", [INFO] [stdout] 372 | | container_id, [INFO] [stdout] ... | [INFO] [stdout] 377 | | "up", [INFO] [stdout] 378 | | ]) [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] 369 ~ .args([ [INFO] [stdout] 370 + "netns", [INFO] [stdout] 371 + "exec", [INFO] [stdout] 372 + container_id, [INFO] [stdout] 373 + "ip", [INFO] [stdout] 374 + "link", [INFO] [stdout] 375 + "set", [INFO] [stdout] 376 + veth_container, [INFO] [stdout] 377 + "up", [INFO] [stdout] 378 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:439:15 [INFO] [stdout] | [INFO] [stdout] 439 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 440 | | "-t", [INFO] [stdout] 441 | | "nat", [INFO] [stdout] 442 | | "-A", [INFO] [stdout] ... | [INFO] [stdout] 450 | | "MASQUERADE", [INFO] [stdout] 451 | | ]) [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] 439 ~ .args([ [INFO] [stdout] 440 + "-t", [INFO] [stdout] 441 + "nat", [INFO] [stdout] 442 + "-A", [INFO] [stdout] 443 + "POSTROUTING", [INFO] [stdout] 444 + "-s", [INFO] [stdout] 445 + "172.19.0.0/16", [INFO] [stdout] 446 + "!", [INFO] [stdout] 447 + "-o", [INFO] [stdout] 448 + "rustainer0", [INFO] [stdout] 449 + "-j", [INFO] [stdout] 450 + "MASQUERADE", [INFO] [stdout] 451 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:389:15 [INFO] [stdout] | [INFO] [stdout] 389 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 390 | | "netns", [INFO] [stdout] 391 | | "exec", [INFO] [stdout] 392 | | container_id, [INFO] [stdout] ... | [INFO] [stdout] 398 | | "172.19.0.1", [INFO] [stdout] 399 | | ]) [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] 389 ~ .args([ [INFO] [stdout] 390 + "netns", [INFO] [stdout] 391 + "exec", [INFO] [stdout] 392 + container_id, [INFO] [stdout] 393 + "ip", [INFO] [stdout] 394 + "route", [INFO] [stdout] 395 + "add", [INFO] [stdout] 396 + "default", [INFO] [stdout] 397 + "via", [INFO] [stdout] 398 + "172.19.0.1", [INFO] [stdout] 399 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:482:19 [INFO] [stdout] | [INFO] [stdout] 482 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 483 | | "-t", [INFO] [stdout] 484 | | "nat", [INFO] [stdout] 485 | | "-A", [INFO] [stdout] ... | [INFO] [stdout] 494 | | &format!("{}:{}", container_ip, container_port), [INFO] [stdout] 495 | | ]) [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] 482 ~ .args([ [INFO] [stdout] 483 + "-t", [INFO] [stdout] 484 + "nat", [INFO] [stdout] 485 + "-A", [INFO] [stdout] 486 + "PREROUTING", [INFO] [stdout] 487 + "-p", [INFO] [stdout] 488 + "tcp", [INFO] [stdout] 489 + "--dport", [INFO] [stdout] 490 + host_port, [INFO] [stdout] 491 + "-j", [INFO] [stdout] 492 + "DNAT", [INFO] [stdout] 493 + "--to-destination", [INFO] [stdout] 494 + &format!("{}:{}", container_ip, container_port), [INFO] [stdout] 495 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:418:15 [INFO] [stdout] | [INFO] [stdout] 418 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 419 | | "netns", [INFO] [stdout] 420 | | "exec", [INFO] [stdout] 421 | | container_id, [INFO] [stdout] ... | [INFO] [stdout] 426 | | "up", [INFO] [stdout] 427 | | ]) [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] 418 ~ .args([ [INFO] [stdout] 419 + "netns", [INFO] [stdout] 420 + "exec", [INFO] [stdout] 421 + container_id, [INFO] [stdout] 422 + "ip", [INFO] [stdout] 423 + "link", [INFO] [stdout] 424 + "set", [INFO] [stdout] 425 + "lo", [INFO] [stdout] 426 + "up", [INFO] [stdout] 427 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:439:15 [INFO] [stdout] | [INFO] [stdout] 439 | .args(&[ [INFO] [stdout] | _______________^ [INFO] [stdout] 440 | | "-t", [INFO] [stdout] 441 | | "nat", [INFO] [stdout] 442 | | "-A", [INFO] [stdout] ... | [INFO] [stdout] 450 | | "MASQUERADE", [INFO] [stdout] 451 | | ]) [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] 439 ~ .args([ [INFO] [stdout] 440 + "-t", [INFO] [stdout] 441 + "nat", [INFO] [stdout] 442 + "-A", [INFO] [stdout] 443 + "POSTROUTING", [INFO] [stdout] 444 + "-s", [INFO] [stdout] 445 + "172.19.0.0/16", [INFO] [stdout] 446 + "!", [INFO] [stdout] 447 + "-o", [INFO] [stdout] 448 + "rustainer0", [INFO] [stdout] 449 + "-j", [INFO] [stdout] 450 + "MASQUERADE", [INFO] [stdout] 451 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:507:19 [INFO] [stdout] | [INFO] [stdout] 507 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 508 | | "-t", [INFO] [stdout] 509 | | "nat", [INFO] [stdout] 510 | | "-A", [INFO] [stdout] ... | [INFO] [stdout] 519 | | &format!("{}:{}", container_ip, container_port), [INFO] [stdout] 520 | | ]) [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] 507 ~ .args([ [INFO] [stdout] 508 + "-t", [INFO] [stdout] 509 + "nat", [INFO] [stdout] 510 + "-A", [INFO] [stdout] 511 + "OUTPUT", [INFO] [stdout] 512 + "-p", [INFO] [stdout] 513 + "tcp", [INFO] [stdout] 514 + "--dport", [INFO] [stdout] 515 + host_port, [INFO] [stdout] 516 + "-j", [INFO] [stdout] 517 + "DNAT", [INFO] [stdout] 518 + "--to-destination", [INFO] [stdout] 519 + &format!("{}:{}", container_ip, container_port), [INFO] [stdout] 520 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:532:19 [INFO] [stdout] | [INFO] [stdout] 532 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 533 | | "-A", [INFO] [stdout] 534 | | "FORWARD", [INFO] [stdout] 535 | | "-i", [INFO] [stdout] ... | [INFO] [stdout] 541 | | "ACCEPT", [INFO] [stdout] 542 | | ]) [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] 532 ~ .args([ [INFO] [stdout] 533 + "-A", [INFO] [stdout] 534 + "FORWARD", [INFO] [stdout] 535 + "-i", [INFO] [stdout] 536 + "rustainer0", [INFO] [stdout] 537 + "!", [INFO] [stdout] 538 + "-o", [INFO] [stdout] 539 + "rustainer0", [INFO] [stdout] 540 + "-j", [INFO] [stdout] 541 + "ACCEPT", [INFO] [stdout] 542 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:482:19 [INFO] [stdout] | [INFO] [stdout] 482 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 483 | | "-t", [INFO] [stdout] 484 | | "nat", [INFO] [stdout] 485 | | "-A", [INFO] [stdout] ... | [INFO] [stdout] 494 | | &format!("{}:{}", container_ip, container_port), [INFO] [stdout] 495 | | ]) [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] 482 ~ .args([ [INFO] [stdout] 483 + "-t", [INFO] [stdout] 484 + "nat", [INFO] [stdout] 485 + "-A", [INFO] [stdout] 486 + "PREROUTING", [INFO] [stdout] 487 + "-p", [INFO] [stdout] 488 + "tcp", [INFO] [stdout] 489 + "--dport", [INFO] [stdout] 490 + host_port, [INFO] [stdout] 491 + "-j", [INFO] [stdout] 492 + "DNAT", [INFO] [stdout] 493 + "--to-destination", [INFO] [stdout] 494 + &format!("{}:{}", container_ip, container_port), [INFO] [stdout] 495 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:553:19 [INFO] [stdout] | [INFO] [stdout] 553 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 554 | | "-A", [INFO] [stdout] 555 | | "FORWARD", [INFO] [stdout] 556 | | "-o", [INFO] [stdout] ... | [INFO] [stdout] 563 | | "ACCEPT", [INFO] [stdout] 564 | | ]) [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] 553 ~ .args([ [INFO] [stdout] 554 + "-A", [INFO] [stdout] 555 + "FORWARD", [INFO] [stdout] 556 + "-o", [INFO] [stdout] 557 + "rustainer0", [INFO] [stdout] 558 + "-m", [INFO] [stdout] 559 + "conntrack", [INFO] [stdout] 560 + "--ctstate", [INFO] [stdout] 561 + "RELATED,ESTABLISHED", [INFO] [stdout] 562 + "-j", [INFO] [stdout] 563 + "ACCEPT", [INFO] [stdout] 564 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:507:19 [INFO] [stdout] | [INFO] [stdout] 507 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 508 | | "-t", [INFO] [stdout] 509 | | "nat", [INFO] [stdout] 510 | | "-A", [INFO] [stdout] ... | [INFO] [stdout] 519 | | &format!("{}:{}", container_ip, container_port), [INFO] [stdout] 520 | | ]) [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] 507 ~ .args([ [INFO] [stdout] 508 + "-t", [INFO] [stdout] 509 + "nat", [INFO] [stdout] 510 + "-A", [INFO] [stdout] 511 + "OUTPUT", [INFO] [stdout] 512 + "-p", [INFO] [stdout] 513 + "tcp", [INFO] [stdout] 514 + "--dport", [INFO] [stdout] 515 + host_port, [INFO] [stdout] 516 + "-j", [INFO] [stdout] 517 + "DNAT", [INFO] [stdout] 518 + "--to-destination", [INFO] [stdout] 519 + &format!("{}:{}", container_ip, container_port), [INFO] [stdout] 520 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:575:19 [INFO] [stdout] | [INFO] [stdout] 575 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 576 | | "-A", [INFO] [stdout] 577 | | "FORWARD", [INFO] [stdout] 578 | | "-d", [INFO] [stdout] ... | [INFO] [stdout] 587 | | "ACCEPT", [INFO] [stdout] 588 | | ]) [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] 575 ~ .args([ [INFO] [stdout] 576 + "-A", [INFO] [stdout] 577 + "FORWARD", [INFO] [stdout] 578 + "-d", [INFO] [stdout] 579 + container_ip, [INFO] [stdout] 580 + "-p", [INFO] [stdout] 581 + "tcp", [INFO] [stdout] 582 + "--dport", [INFO] [stdout] 583 + container_port, [INFO] [stdout] 584 + "-o", [INFO] [stdout] 585 + "rustainer0", [INFO] [stdout] 586 + "-j", [INFO] [stdout] 587 + "ACCEPT", [INFO] [stdout] 588 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:532:19 [INFO] [stdout] | [INFO] [stdout] 532 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 533 | | "-A", [INFO] [stdout] 534 | | "FORWARD", [INFO] [stdout] 535 | | "-i", [INFO] [stdout] ... | [INFO] [stdout] 541 | | "ACCEPT", [INFO] [stdout] 542 | | ]) [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] 532 ~ .args([ [INFO] [stdout] 533 + "-A", [INFO] [stdout] 534 + "FORWARD", [INFO] [stdout] 535 + "-i", [INFO] [stdout] 536 + "rustainer0", [INFO] [stdout] 537 + "!", [INFO] [stdout] 538 + "-o", [INFO] [stdout] 539 + "rustainer0", [INFO] [stdout] 540 + "-j", [INFO] [stdout] 541 + "ACCEPT", [INFO] [stdout] 542 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:599:19 [INFO] [stdout] | [INFO] [stdout] 599 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 600 | | "-A", [INFO] [stdout] 601 | | "FORWARD", [INFO] [stdout] 602 | | "-o", [INFO] [stdout] ... | [INFO] [stdout] 609 | | "ACCEPT", [INFO] [stdout] 610 | | ]) [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] 599 ~ .args([ [INFO] [stdout] 600 + "-A", [INFO] [stdout] 601 + "FORWARD", [INFO] [stdout] 602 + "-o", [INFO] [stdout] 603 + "rustainer0", [INFO] [stdout] 604 + "-m", [INFO] [stdout] 605 + "conntrack", [INFO] [stdout] 606 + "--ctstate", [INFO] [stdout] 607 + "RELATED,ESTABLISHED", [INFO] [stdout] 608 + "-j", [INFO] [stdout] 609 + "ACCEPT", [INFO] [stdout] 610 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:553:19 [INFO] [stdout] | [INFO] [stdout] 553 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 554 | | "-A", [INFO] [stdout] 555 | | "FORWARD", [INFO] [stdout] 556 | | "-o", [INFO] [stdout] ... | [INFO] [stdout] 563 | | "ACCEPT", [INFO] [stdout] 564 | | ]) [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] 553 ~ .args([ [INFO] [stdout] 554 + "-A", [INFO] [stdout] 555 + "FORWARD", [INFO] [stdout] 556 + "-o", [INFO] [stdout] 557 + "rustainer0", [INFO] [stdout] 558 + "-m", [INFO] [stdout] 559 + "conntrack", [INFO] [stdout] 560 + "--ctstate", [INFO] [stdout] 561 + "RELATED,ESTABLISHED", [INFO] [stdout] 562 + "-j", [INFO] [stdout] 563 + "ACCEPT", [INFO] [stdout] 564 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:575:19 [INFO] [stdout] | [INFO] [stdout] 575 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 576 | | "-A", [INFO] [stdout] 577 | | "FORWARD", [INFO] [stdout] 578 | | "-d", [INFO] [stdout] ... | [INFO] [stdout] 587 | | "ACCEPT", [INFO] [stdout] 588 | | ]) [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] 575 ~ .args([ [INFO] [stdout] 576 + "-A", [INFO] [stdout] 577 + "FORWARD", [INFO] [stdout] 578 + "-d", [INFO] [stdout] 579 + container_ip, [INFO] [stdout] 580 + "-p", [INFO] [stdout] 581 + "tcp", [INFO] [stdout] 582 + "--dport", [INFO] [stdout] 583 + container_port, [INFO] [stdout] 584 + "-o", [INFO] [stdout] 585 + "rustainer0", [INFO] [stdout] 586 + "-j", [INFO] [stdout] 587 + "ACCEPT", [INFO] [stdout] 588 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:599:19 [INFO] [stdout] | [INFO] [stdout] 599 | .args(&[ [INFO] [stdout] | ___________________^ [INFO] [stdout] 600 | | "-A", [INFO] [stdout] 601 | | "FORWARD", [INFO] [stdout] 602 | | "-o", [INFO] [stdout] ... | [INFO] [stdout] 609 | | "ACCEPT", [INFO] [stdout] 610 | | ]) [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] 599 ~ .args([ [INFO] [stdout] 600 + "-A", [INFO] [stdout] 601 + "FORWARD", [INFO] [stdout] 602 + "-o", [INFO] [stdout] 603 + "rustainer0", [INFO] [stdout] 604 + "-m", [INFO] [stdout] 605 + "conntrack", [INFO] [stdout] 606 + "--ctstate", [INFO] [stdout] 607 + "RELATED,ESTABLISHED", [INFO] [stdout] 608 + "-j", [INFO] [stdout] 609 + "ACCEPT", [INFO] [stdout] 610 ~ ]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:682:14 [INFO] [stdout] | [INFO] [stdout] 682 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 683 | | "netns", [INFO] [stdout] 684 | | "exec", [INFO] [stdout] 685 | | container_id, [INFO] [stdout] ... | [INFO] [stdout] 694 | | &rootfs_path, [INFO] [stdout] 695 | | ]); [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] 682 ~ cmd.args([ [INFO] [stdout] 683 + "netns", [INFO] [stdout] 684 + "exec", [INFO] [stdout] 685 + container_id, [INFO] [stdout] 686 + "unshare", [INFO] [stdout] 687 + "--mount", [INFO] [stdout] 688 + "--uts", [INFO] [stdout] 689 + "--ipc", [INFO] [stdout] 690 + "--pid", [INFO] [stdout] 691 + "--fork", [INFO] [stdout] 692 + "--mount-proc", [INFO] [stdout] 693 + "chroot", [INFO] [stdout] 694 + &rootfs_path, [INFO] [stdout] 695 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:682:14 [INFO] [stdout] | [INFO] [stdout] 682 | cmd.args(&[ [INFO] [stdout] | ______________^ [INFO] [stdout] 683 | | "netns", [INFO] [stdout] 684 | | "exec", [INFO] [stdout] 685 | | container_id, [INFO] [stdout] ... | [INFO] [stdout] 694 | | &rootfs_path, [INFO] [stdout] 695 | | ]); [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] 682 ~ cmd.args([ [INFO] [stdout] 683 + "netns", [INFO] [stdout] 684 + "exec", [INFO] [stdout] 685 + container_id, [INFO] [stdout] 686 + "unshare", [INFO] [stdout] 687 + "--mount", [INFO] [stdout] 688 + "--uts", [INFO] [stdout] 689 + "--ipc", [INFO] [stdout] 690 + "--pid", [INFO] [stdout] 691 + "--fork", [INFO] [stdout] 692 + "--mount-proc", [INFO] [stdout] 693 + "chroot", [INFO] [stdout] 694 + &rootfs_path, [INFO] [stdout] 695 ~ ]); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/actions/run.rs:745:15 [INFO] [stdout] | [INFO] [stdout] 745 | .args(&["netns", "delete", container_id]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["netns", "delete", container_id]` [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/actions/run.rs:745:15 [INFO] [stdout] | [INFO] [stdout] 745 | .args(&["netns", "delete", container_id]) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["netns", "delete", container_id]` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 00s [INFO] running `Command { std: "docker" "inspect" "1163433d373e9067b4bde7e6841959b4e4db44edb98ac64255d3292f4900948e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1163433d373e9067b4bde7e6841959b4e4db44edb98ac64255d3292f4900948e", kill_on_drop: false }` [INFO] [stdout] 1163433d373e9067b4bde7e6841959b4e4db44edb98ac64255d3292f4900948e