Make fetcher creating infallible ()

Fixes 
This commit is contained in:
Félix Saparelli 2022-04-29 09:24:46 +12:00 committed by GitHub
parent 62ec23e6f4
commit 1757dc5344
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 33 deletions

View file

@ -143,8 +143,8 @@ async fn main() -> Result<(), anyhow::Error> {
// Try github releases, then quickinstall
let mut fetchers = MultiFetcher::default();
fetchers.add(GhCrateMeta::new(&fetcher_data).await?);
fetchers.add(QuickInstall::new(&fetcher_data).await?);
fetchers.add(GhCrateMeta::new(&fetcher_data).await);
fetchers.add(QuickInstall::new(&fetcher_data).await);
let fetcher = fetchers.first_available().await.ok_or_else(|| {
error!("File does not exist remotely, cannot proceed");