@@ -86,7 +86,7 @@ pub fn get_version_from_path(app_package_path: &Path) -> Result<String, anyhow::
86
86
fn find_app (
87
87
app : & str ,
88
88
e2e_bin : bool ,
89
- package_type : ( OsType , Option < PackageType > , Option < Architecture > ) ,
89
+ package_type : ( OsType , Option < PackageType > , Architecture ) ,
90
90
package_dir : Option < & PathBuf > ,
91
91
) -> Result < PathBuf > {
92
92
// If it's a path, use that path
@@ -123,7 +123,7 @@ fn find_app(
123
123
. filter ( |( _path, u8_path) | !e2e_bin || u8_path. contains ( get_os_name ( package_type) ) ) // Filter out irrelevant platforms
124
124
. filter ( |( _path, u8_path) | {
125
125
let linux = e2e_bin || package_type. 0 == OsType :: Linux ;
126
- let matching_ident = package_type. 2 . map ( |arch| arch . get_identifiers ( ) . iter ( ) . any ( |id| u8_path. contains ( id) ) ) . unwrap_or ( true ) ;
126
+ let matching_ident = package_type. 2 . get_identifiers ( ) . iter ( ) . any ( |id| u8_path. contains ( id) ) ;
127
127
// Skip for non-Linux, because there's only one package
128
128
!linux || matching_ident
129
129
} ) // Skip file if it doesn't match the architecture
@@ -143,7 +143,8 @@ fn find_app(
143
143
} )
144
144
}
145
145
146
- fn get_ext ( package_type : ( OsType , Option < PackageType > , Option < Architecture > ) ) -> & ' static str {
146
+ // TODO: Move to [`PackageType`]
147
+ fn get_ext ( package_type : ( OsType , Option < PackageType > , Architecture ) ) -> & ' static str {
147
148
match package_type. 0 {
148
149
OsType :: Windows => "exe" ,
149
150
OsType :: Macos => "pkg" ,
@@ -154,7 +155,8 @@ fn get_ext(package_type: (OsType, Option<PackageType>, Option<Architecture>)) ->
154
155
}
155
156
}
156
157
157
- fn get_os_name ( package_type : ( OsType , Option < PackageType > , Option < Architecture > ) ) -> & ' static str {
158
+ // TODO: Move to [`OsType`]
159
+ fn get_os_name ( package_type : ( OsType , Option < PackageType > , Architecture ) ) -> & ' static str {
158
160
match package_type. 0 {
159
161
OsType :: Windows => "windows" ,
160
162
OsType :: Macos => "apple" ,
0 commit comments