mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 22:30:03 +00:00
Use binary name when searching for artifacts (#1747)
* Use binary name when searching for artifacts When there is a single binary declared in the manifest and it differs from the package name, add it to the list of handles used for pre-built artifact fetching. * Simplify `binary_name` assignment with a `match` * Add e2e test * Only attempt to use the binary name with `GhCrateMeta` fetcher * Avoid too much over-allocating. Technically it should also check if gh-crate-meta resolver is enabled, but it is unlikely for it to be disabled and overallocating for extra n-target should be fine, it is an improvement over doubling the space allocated if the binary_name is Some. * Fix fmt in crates/binstalk/src/ops/resolve.rs --------- Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
a220952fd6
commit
dfa230f039
5 changed files with 82 additions and 39 deletions
|
@ -15,6 +15,8 @@ use crate::{
|
|||
SignaturePolicy, SignatureVerifier, TargetDataErased, DEFAULT_GH_API_RETRY_DURATION,
|
||||
};
|
||||
|
||||
pub const FETCHER_GH_CRATE_META: &str = "GhCrateMeta";
|
||||
|
||||
pub(crate) mod hosting;
|
||||
|
||||
pub struct GhCrateMeta {
|
||||
|
@ -391,7 +393,7 @@ impl super::Fetcher for GhCrateMeta {
|
|||
}
|
||||
|
||||
fn fetcher_name(&self) -> &'static str {
|
||||
"GhCrateMeta"
|
||||
FETCHER_GH_CRATE_META
|
||||
}
|
||||
|
||||
fn is_third_party(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue