@@ -84,7 +84,7 @@ impl HealingFixture {
8484 }
8585
8686 fn open_reader ( & self ) -> FileReader {
87- FileReader :: new ( & self . log_path ( ) ) . unwrap ( )
87+ FileReader :: new ( self . log_path ( ) ) . unwrap ( )
8888 }
8989
9090 fn assert_lines ( & self , reader : & mut FileReader , expected : & [ String ] ) {
@@ -378,8 +378,8 @@ fn detect_symlink_retarget() {
378378 let log2 = dir. path ( ) . join ( "real2.log" ) ;
379379 let link = dir. path ( ) . join ( "current.log" ) ;
380380
381- fs:: write ( & log1, & make_lines ( 10 ) ) . unwrap ( ) ;
382- fs:: write ( & log2, & make_lines_offset ( 100 , 10 ) ) . unwrap ( ) ;
381+ fs:: write ( & log1, make_lines ( 10 ) ) . unwrap ( ) ;
382+ fs:: write ( & log2, make_lines_offset ( 100 , 10 ) ) . unwrap ( ) ;
383383
384384 std:: os:: unix:: fs:: symlink ( & log1, & link) . unwrap ( ) ;
385385 let idx_dir = index_dir_for_log ( & link) ;
@@ -398,7 +398,7 @@ fn detect_symlink_retarget() {
398398#[ test]
399399fn detect_index_dir_is_regular_file ( ) {
400400 let fix = HealingFixture :: new ( & make_lines ( 5 ) ) ;
401- fs:: write ( & fix. idx_dir ( ) , "not a directory" ) . unwrap ( ) ;
401+ fs:: write ( fix. idx_dir ( ) , "not a directory" ) . unwrap ( ) ;
402402
403403 let reader = fix. open_reader ( ) ;
404404 assert ! ( !reader. has_columnar_offsets( ) ) ;
@@ -1081,7 +1081,7 @@ fn manual_edit_same_length_between_checkpoints_must_be_detected() {
10811081 content. push_str ( & format ! ( "line {:04}\n " , i) ) ; // fixed-width: "line 0005\n" = 10 bytes
10821082 }
10831083 let fix = HealingFixture :: new ( & content) ;
1084- let meta = fix. build_index_with_interval ( 10 ) ;
1084+ let _meta = fix. build_index_with_interval ( 10 ) ;
10851085
10861086 // Edit line 5: "line 0005" → "LINE 0005" (same length)
10871087 let edited = content. replace ( "line 0005" , "LINE 0005" ) ;
@@ -1107,7 +1107,7 @@ fn manual_edit_same_length_between_checkpoints_must_be_detected() {
11071107#[ test]
11081108fn manual_edit_changes_line_length_must_invalidate_index ( ) {
11091109 let fix = HealingFixture :: new ( & make_lines ( 20 ) ) ;
1110- let meta = fix. build_index_with_interval ( 10 ) ;
1110+ let _meta = fix. build_index_with_interval ( 10 ) ;
11111111
11121112 // Replace line 5 with a longer version
11131113 let original = fs:: read_to_string ( fix. log_path ( ) ) . unwrap ( ) ;
@@ -1143,7 +1143,7 @@ fn manual_edit_changes_line_length_must_invalidate_index() {
11431143#[ test]
11441144fn manual_insert_lines_in_middle_must_invalidate_index ( ) {
11451145 let fix = HealingFixture :: new ( & make_lines ( 20 ) ) ;
1146- let meta = fix. build_index_with_interval ( 10 ) ;
1146+ let _meta = fix. build_index_with_interval ( 10 ) ;
11471147
11481148 // Insert 3 lines after line 5
11491149 let original = fs:: read_to_string ( fix. log_path ( ) ) . unwrap ( ) ;
@@ -1333,8 +1333,8 @@ fn overwrite_beginning_same_size_must_be_detected() {
13331333
13341334 // Overwrite first 20 bytes with zeros (corrupts first two lines)
13351335 let mut data = fs:: read ( fix. log_path ( ) ) . unwrap ( ) ;
1336- for i in 0 .. 20 {
1337- data [ i ] = 0 ;
1336+ for byte in data . iter_mut ( ) . take ( 20 ) {
1337+ * byte = 0 ;
13381338 }
13391339 fs:: write ( fix. log_path ( ) , & data) . unwrap ( ) ;
13401340
@@ -1345,7 +1345,7 @@ fn overwrite_beginning_same_size_must_be_detected() {
13451345 ) ;
13461346
13471347 // Reader must not return garbage via columnar path
1348- let mut reader = fix. open_reader ( ) ;
1348+ let reader = fix. open_reader ( ) ;
13491349 assert ! (
13501350 !reader. has_columnar_offsets( ) ,
13511351 "reader must fall back to sparse after detecting corruption"
0 commit comments