Dependency Management #187
GitHub Actions / Clippy Output
succeeded
Oct 7, 2024 in 0s
Clippy Output
1 warning
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 1 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.81.0 (eeb90cda1 2024-09-04)
- cargo 1.81.0 (2dbb1af80 2024-08-20)
- clippy 0.1.81 (eeb90cd 2024-09-04)
Annotations
Check warning on line 107 in src/package/management.rs
github-actions / Clippy Output
passing a unit value to a function
warning: passing a unit value to a function
--> src/package/management.rs:99:17
|
99 | / Ok(match reference {
100 | | // gref is an actual reference like branches or tags
101 | | Some(gref) => {
102 | | self.git_rev = gref.target().map(|v| v.to_string());
... |
106 | | None => repo.set_head_detached(object.id())?,
107 | | })
| |__________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
= note: `#[warn(clippy::unit_arg)]` on by default
help: move the expression in front of the call and replace it with the unit literal `()`
|
99 ~ match reference {
100 + // gref is an actual reference like branches or tags
101 + Some(gref) => {
102 + self.git_rev = gref.target().map(|v| v.to_string());
103 + repo.set_head(gref.name().unwrap())?
104 + }
105 + // this is a commit, not a reference
106 + None => repo.set_head_detached(object.id())?,
107 + };
108 + Ok(())
|
Loading