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:
Tomas Olvecky 2024-06-14 06:52:37 +02:00 committed by GitHub
parent a220952fd6
commit dfa230f039
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 82 additions and 39 deletions

View file

@ -1,3 +1,4 @@
[toolchain]
channel = "stable"
profile = "minimal"
components = ["rustfmt", "clippy"]