File tree Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ pub fn get_embedded_binary_path(binary_name: &str) -> Result<PathBuf> {
5151 if let Some ( mut target_dir) = exe_dir {
5252 // Navigate up to find the target/ directory
5353 // Executable might be in target/release/ or target/release/deps/
54- while target_dir. file_name ( ) . map_or ( false , |n| n != "target" ) {
54+ while target_dir. file_name ( ) . is_some_and ( |n| n != "target" ) {
5555 if !target_dir. pop ( ) {
5656 break ;
5757 }
@@ -70,7 +70,7 @@ pub fn get_embedded_binary_path(binary_name: &str) -> Result<PathBuf> {
7070 && path
7171 . file_name ( )
7272 . and_then ( |n| n. to_str ( ) )
73- . map_or ( false , |n| n. starts_with ( "fastga-rs-" ) )
73+ . is_some_and ( |n| n. starts_with ( "fastga-rs-" ) )
7474 {
7575 let binary_path = path. join ( "out" ) . join ( binary_name) ;
7676 if binary_path. exists ( ) {
@@ -114,22 +114,6 @@ pub fn get_embedded_binary_path(binary_name: &str) -> Result<PathBuf> {
114114 ) )
115115}
116116
117- /// Get paths for all FastGA binaries
118- pub struct FastGABinaries {
119- pub fastga : PathBuf ,
120- pub alntopaf : PathBuf ,
121- pub paftoaln : PathBuf ,
122- }
123-
124- impl FastGABinaries {
125- pub fn new ( ) -> Result < Self > {
126- Ok ( FastGABinaries {
127- fastga : get_embedded_binary_path ( "FastGA" ) ?,
128- alntopaf : get_embedded_binary_path ( "ALNtoPAF" ) ?,
129- paftoaln : get_embedded_binary_path ( "PAFtoALN" ) ?,
130- } )
131- }
132- }
133117
134118#[ cfg( test) ]
135119mod tests {
Original file line number Diff line number Diff line change @@ -1381,8 +1381,8 @@ fn main() -> Result<()> {
13811381 }
13821382 }
13831383 Err ( e) => {
1384- println ! ( "✗ {}: NOT FOUND" , bin ) ;
1385- println ! ( " Error: {}" , e ) ;
1384+ println ! ( "✗ {bin }: NOT FOUND" ) ;
1385+ println ! ( " Error: {e}" ) ;
13861386 all_found = false ;
13871387 }
13881388 }
You can’t perform that action at this time.
0 commit comments