Clippy suggestions

This commit is contained in:
Félix Saparelli 2022-06-01 00:47:32 +12:00
parent 13a8e1e5fe
commit ac74da4a27
No known key found for this signature in database
GPG key ID: B948C4BAE44FC474
6 changed files with 17 additions and 25 deletions

View file

@ -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);
}
}