@@ -646,8 +646,14 @@ pub fn parse_record_to_index(data: &[u8], frs: u64, index: &mut crate::index::Mf
646646 } ;
647647 if is_better || primary_name. is_none ( ) {
648648 // Move old primary to additional if exists
649- if let Some ( ( old_name, old_parent, _, old_parse_idx) ) = primary_name. take ( ) {
650- additional_names. push ( ( old_name, old_parent, old_parse_idx) ) ;
649+ if let Some ( ( old_name, old_parent, _, old_parse_idx) ) =
650+ primary_name. take ( )
651+ {
652+ additional_names. push ( (
653+ old_name,
654+ old_parent,
655+ old_parse_idx,
656+ ) ) ;
651657 }
652658 primary_name = Some ( ( name, parent_frs, namespace, parse_idx) ) ;
653659 } else {
@@ -667,9 +673,7 @@ pub fn parse_record_to_index(data: &[u8], frs: u64, index: &mut crate::index::Mf
667673 let nr_offset = offset + 16 ;
668674 if nr_offset + 8 <= data. len ( ) {
669675 let lowest_vcn = i64:: from_le_bytes (
670- data[ nr_offset..nr_offset + 8 ]
671- . try_into ( )
672- . unwrap_or ( [ 0 ; 8 ] ) ,
676+ data[ nr_offset..nr_offset + 8 ] . try_into ( ) . unwrap_or ( [ 0 ; 8 ] ) ,
673677 ) ;
674678 lowest_vcn == 0
675679 } else {
@@ -835,7 +839,8 @@ pub fn parse_record_to_index(data: &[u8], frs: u64, index: &mut crate::index::Mf
835839 let additional_count = additional_names. len ( ) ;
836840 let mut link_indices: Vec < u32 > = Vec :: with_capacity ( additional_count) ;
837841 // Collect parent FRS values for building children array later
838- let mut additional_parent_frs: SmallVec < [ ( u64 , u16 ) ; 4 ] > = SmallVec :: with_capacity ( additional_count) ;
842+ let mut additional_parent_frs: SmallVec < [ ( u64 , u16 ) ; 4 ] > =
843+ SmallVec :: with_capacity ( additional_count) ;
839844 for ( link_name, link_parent, link_parse_idx) in additional_names {
840845 additional_parent_frs. push ( ( link_parent, link_parse_idx) ) ;
841846 let link_offset = index. add_name ( & link_name) ;
@@ -1083,9 +1088,7 @@ fn parse_extension_to_index(
10831088 let nr_offset = offset + 16 ;
10841089 if nr_offset + 8 <= data. len ( ) {
10851090 let lowest_vcn = i64:: from_le_bytes (
1086- data[ nr_offset..nr_offset + 8 ]
1087- . try_into ( )
1088- . unwrap_or ( [ 0 ; 8 ] ) ,
1091+ data[ nr_offset..nr_offset + 8 ] . try_into ( ) . unwrap_or ( [ 0 ; 8 ] ) ,
10891092 ) ;
10901093 lowest_vcn == 0
10911094 } else {
@@ -1517,8 +1520,14 @@ pub fn parse_record_to_fragment(
15171520 _ => false ,
15181521 } ;
15191522 if is_better || primary_name. is_none ( ) {
1520- if let Some ( ( old_name, old_parent, _, old_parse_idx) ) = primary_name. take ( ) {
1521- additional_names. push ( ( old_name, old_parent, old_parse_idx) ) ;
1523+ if let Some ( ( old_name, old_parent, _, old_parse_idx) ) =
1524+ primary_name. take ( )
1525+ {
1526+ additional_names. push ( (
1527+ old_name,
1528+ old_parent,
1529+ old_parse_idx,
1530+ ) ) ;
15221531 }
15231532 primary_name = Some ( ( name, parent_frs, namespace, parse_idx) ) ;
15241533 } else {
@@ -1538,9 +1547,7 @@ pub fn parse_record_to_fragment(
15381547 let nr_offset = offset + 16 ;
15391548 if nr_offset + 8 <= data. len ( ) {
15401549 let lowest_vcn = i64:: from_le_bytes (
1541- data[ nr_offset..nr_offset + 8 ]
1542- . try_into ( )
1543- . unwrap_or ( [ 0 ; 8 ] ) ,
1550+ data[ nr_offset..nr_offset + 8 ] . try_into ( ) . unwrap_or ( [ 0 ; 8 ] ) ,
15441551 ) ;
15451552 lowest_vcn == 0
15461553 } else {
@@ -1702,7 +1709,8 @@ pub fn parse_record_to_fragment(
17021709 let additional_count = additional_names. len ( ) ;
17031710 let mut link_indices: Vec < u32 > = Vec :: with_capacity ( additional_count) ;
17041711 // Collect parent FRS values for building children array later
1705- let mut additional_parent_frs: SmallVec < [ ( u64 , u16 ) ; 4 ] > = SmallVec :: with_capacity ( additional_count) ;
1712+ let mut additional_parent_frs: SmallVec < [ ( u64 , u16 ) ; 4 ] > =
1713+ SmallVec :: with_capacity ( additional_count) ;
17061714 for ( link_name, link_parent, link_parse_idx) in additional_names {
17071715 additional_parent_frs. push ( ( link_parent, link_parse_idx) ) ;
17081716 let link_offset = fragment. add_name ( & link_name) ;
@@ -2028,9 +2036,7 @@ fn parse_extension_to_fragment(
20282036 let nr_offset = offset + 16 ;
20292037 if nr_offset + 8 <= data. len ( ) {
20302038 let lowest_vcn = i64:: from_le_bytes (
2031- data[ nr_offset..nr_offset + 8 ]
2032- . try_into ( )
2033- . unwrap_or ( [ 0 ; 8 ] ) ,
2039+ data[ nr_offset..nr_offset + 8 ] . try_into ( ) . unwrap_or ( [ 0 ; 8 ] ) ,
20342040 ) ;
20352041 lowest_vcn == 0
20362042 } else {
@@ -5348,8 +5354,10 @@ impl ParallelMftReader {
53485354 ///
53495355 /// This method uses a producer-consumer pattern:
53505356 /// - IOCP thread reads data and sends buffers to a channel
5351- /// - Worker threads parse buffers using `parse_record_full()` (unified pipeline)
5352- /// - After all I/O completes, results are merged via `MftRecordMerger` into final index
5357+ /// - Worker threads parse buffers using `parse_record_full()` (unified
5358+ /// pipeline)
5359+ /// - After all I/O completes, results are merged via `MftRecordMerger` into
5360+ /// final index
53535361 ///
53545362 /// This is beneficial for NVMe drives where I/O is faster than parsing.
53555363 /// For HDD, use `read_all_sliding_window_iocp_to_index` (inline parsing).
0 commit comments