@@ -240,7 +240,7 @@ async fn test_read_text_file_with_line_numbers() {
240240 let file_path = create_temp_file (
241241 temp_dir. join ( "dir1" ) . as_path ( ) ,
242242 "test.txt" ,
243- "line1\n line2\n line3"
243+ "line1\n line2\n line3" ,
244244 ) ;
245245 let content = service. read_text_file ( & file_path, true ) . await . unwrap ( ) ;
246246 assert_eq ! ( content, " 1 | line1\n 2 | line2\n 3 | line3" ) ;
@@ -252,7 +252,7 @@ async fn test_read_text_file_without_line_numbers() {
252252 let file_path = create_temp_file (
253253 temp_dir. join ( "dir1" ) . as_path ( ) ,
254254 "test.txt" ,
255- "line1\n line2\n line3"
255+ "line1\n line2\n line3" ,
256256 ) ;
257257 let content = service. read_text_file ( & file_path, false ) . await . unwrap ( ) ;
258258 assert_eq ! ( content, "line1\n line2\n line3" ) ;
@@ -280,7 +280,7 @@ async fn test_read_text_file_with_line_numbers_no_trailing_newline() {
280280 let file_path = create_temp_file (
281281 temp_dir. join ( "dir1" ) . as_path ( ) ,
282282 "no_newline.txt" ,
283- "line1\n line2"
283+ "line1\n line2" ,
284284 ) ;
285285 let content = service. read_text_file ( & file_path, true ) . await . unwrap ( ) ;
286286 assert_eq ! ( content, " 1 | line1\n 2 | line2" ) ;
@@ -292,14 +292,10 @@ async fn test_read_text_file_with_line_numbers_large_file() {
292292 // Create a file with more than 999 lines to test padding
293293 let mut lines = Vec :: new ( ) ;
294294 for i in 1 ..=1000 {
295- lines. push ( format ! ( "line{}" , i ) ) ;
295+ lines. push ( format ! ( "line{i}" ) ) ;
296296 }
297297 let file_content = lines. join ( "\n " ) ;
298- let file_path = create_temp_file (
299- temp_dir. join ( "dir1" ) . as_path ( ) ,
300- "large.txt" ,
301- & file_content
302- ) ;
298+ let file_path = create_temp_file ( temp_dir. join ( "dir1" ) . as_path ( ) , "large.txt" , & file_content) ;
303299 let content = service. read_text_file ( & file_path, true ) . await . unwrap ( ) ;
304300
305301 // Check first line
0 commit comments