@@ -614,7 +614,7 @@ fn calculate_ani_stats(input_path: &str, method: AniMethod, quiet: bool) -> Resu
614614
615615 // Get 50th percentile (median)
616616 let median_idx = ani_values. len ( ) / 2 ;
617- let ani50 = if ani_values. len ( ) % 2 == 0 && ani_values. len ( ) > 1 {
617+ let ani50 = if ani_values. len ( ) . is_multiple_of ( 2 ) && ani_values. len ( ) > 1 {
618618 ( ani_values[ median_idx - 1 ] + ani_values[ median_idx] ) / 2.0
619619 } else {
620620 ani_values[ median_idx]
@@ -826,7 +826,7 @@ fn calculate_ani_n_percentile(
826826
827827 // Get median
828828 let median_idx = ani_values. len ( ) / 2 ;
829- let ani50 = if ani_values. len ( ) % 2 == 0 && ani_values. len ( ) > 1 {
829+ let ani50 = if ani_values. len ( ) . is_multiple_of ( 2 ) && ani_values. len ( ) > 1 {
830830 ( ani_values[ median_idx - 1 ] + ani_values[ median_idx] ) / 2.0
831831 } else {
832832 ani_values[ median_idx]
@@ -1133,7 +1133,7 @@ fn align_multiple_fastas(
11331133 let input_file = & fasta_files[ 0 ] ;
11341134 // Canonicalize path to avoid empty parent directory issues in fastga-rs
11351135 let input_path = std:: fs:: canonicalize ( input_file)
1136- . with_context ( || format ! ( "Failed to resolve path: {}" , input_file ) ) ?;
1136+ . with_context ( || format ! ( "Failed to resolve path: {input_file}" ) ) ?;
11371137 let temp_paf = fastga. align_to_temp_paf ( & input_path, & input_path) ?;
11381138
11391139 if !quiet {
@@ -1368,7 +1368,7 @@ fn main() -> Result<()> {
13681368
13691369 // Show help if no arguments provided
13701370 if args. files . is_empty ( ) {
1371- Args :: parse_from ( & [ "sweepga" , "-h" ] ) ;
1371+ Args :: parse_from ( [ "sweepga" , "-h" ] ) ;
13721372 }
13731373
13741374 let timing = TimingContext :: new ( ) ;
@@ -1812,7 +1812,7 @@ fn main() -> Result<()> {
18121812
18131813 // Canonicalize path to avoid empty parent directory issues in fastga-rs
18141814 let path = std:: fs:: canonicalize ( & temp_path)
1815- . with_context ( || format ! ( "Failed to resolve path: {}" , temp_path ) ) ?;
1815+ . with_context ( || format ! ( "Failed to resolve path: {temp_path}" ) ) ?;
18161816 let fastga = create_fastga_integration ( args. frequency , args. threads ) ?;
18171817 let temp_paf = fastga. align_to_temp_paf ( & path, & path) ?;
18181818
0 commit comments