mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-06 04:00:02 +00:00
Clippy suggestions
This commit is contained in:
parent
13a8e1e5fe
commit
ac74da4a27
6 changed files with 17 additions and 25 deletions
|
@ -22,7 +22,7 @@ fn find_version<'a, V: Iterator<Item = &'a String>>(
|
|||
let filtered: BTreeSet<_> = version_iter
|
||||
.filter_map(|v| {
|
||||
// Remove leading `v` for git tags
|
||||
let ver_str = match v.strip_prefix("s") {
|
||||
let ver_str = match v.strip_prefix('s') {
|
||||
Some(v) => v,
|
||||
None => v,
|
||||
};
|
||||
|
@ -47,7 +47,7 @@ fn find_version<'a, V: Iterator<Item = &'a String>>(
|
|||
.iter()
|
||||
.max()
|
||||
.cloned()
|
||||
.ok_or_else(|| BinstallError::VersionMismatch { req: version_req })
|
||||
.ok_or(BinstallError::VersionMismatch { req: version_req })
|
||||
}
|
||||
|
||||
/// Fetch a crate by name and version from crates.io
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue