@@ -312,7 +312,7 @@ mod tests {
312312 let result = download_from_url ( "not-a-valid-url" ) ;
313313 assert ! ( result. is_none( ) ) ;
314314 }
315-
315+
316316 #[ test]
317317 #[ cfg( unix) ]
318318 fn test_download_fails_on_file_write_error_preserves_parent ( ) {
@@ -321,7 +321,7 @@ mod tests {
321321
322322 let temp_dir = TempDir :: new ( ) . unwrap ( ) ;
323323 let nested_path = temp_dir. path ( ) . join ( "new_dir" ) ;
324-
324+
325325 // Create the directory and make it read-only to prevent file creation
326326 fs:: create_dir_all ( & nested_path) . unwrap ( ) ;
327327 let mut perms = fs:: metadata ( & nested_path) . unwrap ( ) . permissions ( ) ;
@@ -330,7 +330,7 @@ mod tests {
330330
331331 let result = download_file ( & container_url, nested_path. to_str ( ) . unwrap ( ) , "test.json" ) ;
332332
333- // Download should fail due to inability to write file and Parent directory should still exist
333+ // Download should fail due to inability to write file. Parent directory should still exist
334334 assert ! ( result. is_none( ) ) ;
335335 assert ! ( nested_path. exists( ) ) ;
336336 }
@@ -344,7 +344,7 @@ mod tests {
344344 let temp_dir = TempDir :: new ( ) . unwrap ( ) ;
345345 let parent_path = temp_dir. path ( ) ;
346346 let file_path = parent_path. join ( "test.json" ) ;
347-
347+
348348 // Pre-create a read-only file to force write failure
349349 fs:: write ( & file_path, b"old content" ) . unwrap ( ) ;
350350 let mut perms = fs:: metadata ( & file_path) . unwrap ( ) . permissions ( ) ;
@@ -353,10 +353,13 @@ mod tests {
353353
354354 let result = download_file ( & container_url, parent_path. to_str ( ) . unwrap ( ) , "test.json" ) ;
355355 assert ! ( result. is_none( ) ) ;
356-
357- // Parent directory should still exist File should be deleted on cleanup
356+
357+ // Parent directory should still exist. File should be deleted on cleanup
358358 assert ! ( parent_path. exists( ) ) ;
359- assert ! ( !file_path. exists( ) , "File should have been cleaned up after write failure" ) ;
359+ assert ! (
360+ !file_path. exists( ) ,
361+ "File should have been cleaned up after write failure"
362+ ) ;
360363 }
361364
362365 #[ test]
0 commit comments