Skip to content

feat: initial choice of exec command #82

feat: initial choice of exec command

feat: initial choice of exec command #82

Triggered via pull request July 8, 2024 20:04
Status Success
Total duration 1m 13s
Artifacts

check.yml

on: pull_request
check  /  ...  /  fmt
7s
check / stable / fmt
check  /  ...  /  doc
50s
check / nightly / doc
check  /  ...  /  check
48s
check / 1.78.0 / check
Matrix: check / clippy
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
useless conversion to the same type: `std::str::SplitWhitespace<'_>`: src/docker/container.rs#L144
warning: useless conversion to the same type: `std::str::SplitWhitespace<'_>` --> src/docker/container.rs:144:34 | 144 | let parts: Vec<String> = cmd | __________________________________^ 145 | | .split_whitespace() 146 | | .into_iter() | |________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default help: consider removing `.into_iter()` | 144 ~ let parts: Vec<String> = cmd 145 + .split_whitespace() |
redundant closure: src/docker/container.rs#L147
warning: redundant closure --> src/docker/container.rs:147:18 | 147 | .map(|v| String::from(v)) | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `String::from` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `#[warn(clippy::redundant_closure)]` on by default
returning the result of a `let` binding from a block: src/pages/attach.rs#L70
warning: returning the result of a `let` binding from a block --> src/pages/attach.rs:70:9 | 60 | / let page_help = PageHelpBuilder::new( 61 | | match name { 62 | | Some(n) => n, 63 | | None => NAME.into(), ... | 68 | | .add_input(format!("{ENTER}"), "exec".into()) 69 | | .build(); | |_________________- unnecessary `let` binding 70 | page_help | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return = note: `#[warn(clippy::let_and_return)]` on by default help: return the expression directly | 60 ~ 61 ~ PageHelpBuilder::new( 62 + match name { 63 + Some(n) => n, 64 + None => NAME.into(), 65 + }, 66 + config.clone(), 67 + ) 68 + .add_input(format!("{ESC_KEY}"), "back".into()) 69 + .add_input(format!("{ENTER}"), "exec".into()) 70 + .build() |
this expression creates a reference which is immediately dereferenced by the compiler: src/pages/attach.rs#L96
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/pages/attach.rs:96:36 | 96 | let res = container.attach(&exec).await; | ^^^^^ help: change this to: `exec` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
redundant pattern matching, consider using `is_err()`: src/pages/attach.rs#L101
warning: redundant pattern matching, consider using `is_err()` --> src/pages/attach.rs:101:16 | 101 | if let Err(_) = res { | -------^^^^^^------ help: try: `if res.is_err()` | = note: this will change drop order of the result, as well as all temporaries = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching = note: `#[warn(clippy::redundant_pattern_matching)]` on by default
useless conversion to the same type: `std::str::SplitWhitespace<'_>`: src/docker/container.rs#L144
warning: useless conversion to the same type: `std::str::SplitWhitespace<'_>` --> src/docker/container.rs:144:34 | 144 | let parts: Vec<String> = cmd | __________________________________^ 145 | | .split_whitespace() 146 | | .into_iter() | |________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default help: consider removing `.into_iter()` | 144 ~ let parts: Vec<String> = cmd 145 + .split_whitespace() |
redundant closure: src/docker/container.rs#L147
warning: redundant closure --> src/docker/container.rs:147:18 | 147 | .map(|v| String::from(v)) | ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `String::from` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `#[warn(clippy::redundant_closure)]` on by default
returning the result of a `let` binding from a block: src/pages/attach.rs#L70
warning: returning the result of a `let` binding from a block --> src/pages/attach.rs:70:9 | 60 | / let page_help = PageHelpBuilder::new( 61 | | match name { 62 | | Some(n) => n, 63 | | None => NAME.into(), ... | 68 | | .add_input(format!("{ENTER}"), "exec".into()) 69 | | .build(); | |_________________- unnecessary `let` binding 70 | page_help | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return = note: `#[warn(clippy::let_and_return)]` on by default help: return the expression directly | 60 ~ 61 ~ PageHelpBuilder::new( 62 + match name { 63 + Some(n) => n, 64 + None => NAME.into(), 65 + }, 66 + config.clone(), 67 + ) 68 + .add_input(format!("{ESC_KEY}"), "back".into()) 69 + .add_input(format!("{ENTER}"), "exec".into()) 70 + .build() |
this expression creates a reference which is immediately dereferenced by the compiler: src/pages/attach.rs#L96
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/pages/attach.rs:96:36 | 96 | let res = container.attach(&exec).await; | ^^^^^ help: change this to: `exec` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
redundant pattern matching, consider using `is_err()`: src/pages/attach.rs#L101
warning: redundant pattern matching, consider using `is_err()` --> src/pages/attach.rs:101:16 | 101 | if let Err(_) = res { | -------^^^^^^------ help: try: `if res.is_err()` | = note: this will change drop order of the result, as well as all temporaries = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching = note: `#[warn(clippy::redundant_pattern_matching)]` on by default