mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-16 15:46:36 +00:00
Use pkg_fmt from fetcher
This commit is contained in:
parent
a12e934940
commit
99e5de0025
4 changed files with 17 additions and 4 deletions
|
@ -3,7 +3,7 @@ use std::path::Path;
|
|||
pub use gh_release::*;
|
||||
pub use quickinstall::*;
|
||||
|
||||
use crate::PkgMeta;
|
||||
use crate::{PkgFmt, PkgMeta};
|
||||
|
||||
mod gh_release;
|
||||
mod quickinstall;
|
||||
|
@ -20,6 +20,9 @@ pub trait Fetcher {
|
|||
|
||||
/// Check if a package is available for download
|
||||
async fn check(&self) -> Result<bool, anyhow::Error>;
|
||||
|
||||
/// Return the package format
|
||||
fn pkg_fmt(&self) -> PkgFmt;
|
||||
}
|
||||
|
||||
/// Data required to fetch a package
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue