Skip to content

test: write integration tets for print with format flag #61

test: write integration tets for print with format flag

test: write integration tets for print with format flag #61

GitHub Actions / Clippy: Rust Stable 1.85.1 (4eb161250 2025-03-15) in succeeded Mar 22, 2025 in 14s

Clippy (Stable ~ macOS/ARM64)

Clippy was successful!

Details

Running cargo clippy took roughly ~13905ms to complete

  • Working Directory: repository directory

Annotations

Check warning on line 55 in /Users/runner/work/envfetch/envfetch/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy: Rust Stable 1.85.1 (4eb161250 2025-03-15) in

/Users/runner/work/envfetch/envfetch/src/main.rs#L55

called `expect` on `config` after checking its variant with `is_none`
Raw output
warning: called `expect` on `config` after checking its variant with `is_none`
  --> src/commands.rs:55:29
   |
51 |             let opt = if opt.format.is_some() || config.is_none() {
   |                                                  ---------------- the check is happening here
...
55 |                     format: config.expect("Here we know that it is some").print_format,
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: try using `if let` or `match`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap
   = note: `#[warn(clippy::unnecessary_unwrap)]` on by default