11//@ ignore-windows
22
33// This test attempts to make sure that running `remove_dir_all`
4- // doesn't result in a NotFound error one of the files it
4+ // doesn't result in a NotFound error if one of the files it
55// is deleting is deleted concurrently.
66//
77// The windows implementation for `remove_dir_all` is significantly
88// more complicated, and has not yet been brought up to par with
99// the implementation on other platforms, so this test is marked as
10- // `ignore-windows` until someone more expirenced with windows can
10+ // `ignore-windows` until someone more experienced with windows can
1111// sort that out.
1212
1313use std:: fs:: remove_dir_all;
@@ -27,13 +27,12 @@ fn main() {
2727 write ( "outer/inner.txt" , b"sometext" ) ;
2828
2929 thread:: scope ( |scope| {
30- let t1 = scope. spawn ( || {
30+ scope. spawn ( || {
3131 thread:: sleep ( Duration :: from_nanos ( i) ) ;
3232 remove_dir_all ( "outer" ) . unwrap ( ) ;
3333 } ) ;
3434
35- let race_happened_ref = & race_happened;
36- let t2 = scope. spawn ( || {
35+ scope. spawn ( || {
3736 let r1 = remove_dir_all ( "outer/inner" ) ;
3837 let r2 = remove_dir_all ( "outer/inner.txt" ) ;
3938 if r1. is_ok ( ) && r2. is_err ( ) {
@@ -44,10 +43,10 @@ fn main() {
4443
4544 assert ! ( !Path :: new( "outer" ) . exists( ) ) ;
4645
47- // trying to remove a nonexistant top-level directory should
46+ // trying to remove a nonexistent top-level directory should
4847 // still result in an error.
4948 let Err ( err) = remove_dir_all ( "outer" ) else {
50- panic ! ( "removing nonexistant dir did not result in an error" ) ;
49+ panic ! ( "removing nonexistent dir did not result in an error" ) ;
5150 } ;
5251 assert_eq ! ( err. kind( ) , std:: io:: ErrorKind :: NotFound ) ;
5352 }
0 commit comments