mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-12 06:50:02 +00:00
Clippy suggestions
This commit is contained in:
parent
13a8e1e5fe
commit
ac74da4a27
6 changed files with 17 additions and 25 deletions
|
@ -54,14 +54,16 @@ impl MultiFetcher {
|
|||
|
||||
pub async fn first_available(&self) -> Option<&dyn Fetcher> {
|
||||
for fetcher in &self.fetchers {
|
||||
if fetcher.check().await.unwrap_or_else(|err| {
|
||||
let available = fetcher.check().await.unwrap_or_else(|err| {
|
||||
debug!(
|
||||
"Error while checking fetcher {}: {}",
|
||||
fetcher.source_name(),
|
||||
err
|
||||
);
|
||||
false
|
||||
}) {
|
||||
});
|
||||
|
||||
if available {
|
||||
return Some(&**fetcher);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue