optimize ResolutionFetch::resolve_bins

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
Jiahao XU 2025-06-10 19:58:26 +10:00 committed by GitHub
parent 4d7be692ce
commit 9aa9458e75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -99,8 +99,8 @@ impl ResolutionFetch {
// We need to filter crate_bin_files by user_specified_bins in case the prebuilt doesn't
// have featured-gated (optional) binary (gated behind feature).
crate_bin_files
.iter()
.map(|bin| bin.base_name.clone())
.into_iter()
.map(|bin| bin.base_name)
.filter(|bin_name| {
user_specified_bins
.as_ref()