Dependency Management #41
Clippy Output
6 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 6 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.74.1 (a28077b28 2023-12-04)
- cargo 1.74.1 (ecb9851af 2023-10-18)
- clippy 0.1.74 (a28077b 2023-12-04)
Annotations
Check warning on line 75 in src/package/version.rs
github-actions / Clippy Output
question mark operator is useless here
warning: question mark operator is useless here
--> src/package/version.rs:75:5
|
75 | Ok(s.serialize_str(&serialized_string)?)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `s.serialize_str(&serialized_string)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
Check warning on line 64 in src/package/version.rs
github-actions / Clippy Output
question mark operator is useless here
warning: question mark operator is useless here
--> src/package/version.rs:64:13
|
64 | Ok(Version::from_str(s).map_err(|e| E::invalid_value(serde::de::Unexpected::Str(s), &self))?)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `Version::from_str(s).map_err(|e| E::invalid_value(serde::de::Unexpected::Str(s), &self))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
= note: `#[warn(clippy::needless_question_mark)]` on by default
Check warning on line 42 in src/package/version.rs
github-actions / Clippy Output
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/package/version.rs:36:13
|
36 | / match part {
37 | | &Err( err ) =>
38 | | return
39 | | Err( format!( "Invalid version format: expected integer, got '{}'."
40 | | , err ) ),
41 | | _ => {}
42 | | }
| |_____________^
|
= 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
|
36 ~ if let &Err( err ) = part { return
37 + Err( format!( "Invalid version format: expected integer, got '{}'."
38 + , err ) ) }
|
Check warning on line 42 in src/package/management.rs
github-actions / Clippy Output
method `fetch` is never used
warning: method `fetch` is never used
--> src/package/management.rs:42:8
|
41 | impl DetailedDependency {
| ----------------------- method in this implementation
42 | fn fetch(&self, library_path: &PathBuf) -> anyhow::Result<()>{
| ^^^^^
Check warning on line 26 in src/package/management.rs
github-actions / Clippy Output
function `copy_dir_all` is never used
warning: function `copy_dir_all` is never used
--> src/package/management.rs:26:4
|
26 | fn copy_dir_all(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> std::io::Result<()> {
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 64 in src/package/version.rs
github-actions / Clippy Output
unused variable: `e`
warning: unused variable: `e`
--> src/package/version.rs:64:46
|
64 | Ok(Version::from_str(s).map_err(|e| E::invalid_value(serde::de::Unexpected::Str(s), &self))?)
| ^ help: if this is intentional, prefix it with an underscore: `_e`
|
= note: `#[warn(unused_variables)]` on by default