From 38c9daadadb349c39d32e1af2e68128995addc23 Mon Sep 17 00:00:00 2001 From: Dave Rolsky Date: Sun, 24 Nov 2024 12:59:04 -0600 Subject: [PATCH] Remove `maybe_filter_for_musl_platform` from picker code Now that we check the libc name along with OS & arch, this code was redundant. --- ubi/src/picker.rs | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/ubi/src/picker.rs b/ubi/src/picker.rs index 4210a4c..8bcb295 100644 --- a/ubi/src/picker.rs +++ b/ubi/src/picker.rs @@ -213,8 +213,6 @@ impl<'a> AssetPicker<'a> { return Ok(asset); } - let filtered = self.maybe_filter_for_musl_platform(filtered); - debug!( "cannot disambiguate multiple asset names, picking the first one after sorting by name" ); @@ -312,33 +310,6 @@ impl<'a> AssetPicker<'a> { (matches, None) } - fn maybe_filter_for_musl_platform(&mut self, matches: Vec) -> Vec { - if !self.is_musl { - return matches; - } - - let asset_names = matches.iter().map(|a| a.name.as_str()).collect::>(); - debug!( - "found multiple candidate assets, filtering for musl binaries in {:?}", - asset_names, - ); - - if !matches.iter().any(|a| a.name.contains("musl")) { - debug!("no musl assets found, falling back to all assets"); - return matches; - } - - let musl = matches - .into_iter() - .filter(|a| a.name.contains("musl")) - .collect::>(); - debug!( - "found musl assets: {}", - musl.iter().map(|a| a.name.as_str()).join(",") - ); - musl - } - fn os_matcher(&self) -> &'static Lazy { debug!("current OS = {}", self.platform.target_os);