Skip to content
GitHub Actions / clippy succeeded Jan 24, 2024 in 0s

clippy

3 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 3
Note 0
Help 0

Versions

  • rustc 1.75.0 (82e1608df 2023-12-21)
  • cargo 1.75.0 (1d8b05cdd 2023-11-20)
  • clippy 0.1.75 (82e1608 2023-12-21)

Annotations

Check warning on line 55 in src/disk.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> src/disk.rs:55:53
   |
55 |     let target = pathdiff::diff_paths(&destination, &source.parent().unwrap()).unwrap();
   |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `source.parent().unwrap()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 55 in src/disk.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> src/disk.rs:55:39
   |
55 |     let target = pathdiff::diff_paths(&destination, &source.parent().unwrap()).unwrap();
   |                                       ^^^^^^^^^^^^ help: change this to: `destination`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
   = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default

Check warning on line 47 in src/disk.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`

warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
  --> src/disk.rs:42:9
   |
42 | /         match fs::create_dir_all(parent) {
43 | |             Err(err) => {
44 | |                 error!("Couldn't create folder {}: {}", parent.display(), err);
45 | |             }
46 | |             Ok(()) => (),
47 | |         }
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
   = note: `#[warn(clippy::single_match)]` on by default
help: try
   |
42 ~         if let Err(err) = fs::create_dir_all(parent) {
43 +             error!("Couldn't create folder {}: {}", parent.display(), err);
44 +         }
   |