@@ -136,7 +136,12 @@ mod imp {
136136pub ( crate ) mod atomic_dir_imp {
137137 //! The [`VfsSupportsTemporaryDirectories`] implementation for the [`FsVfs`] file system.
138138
139+ use std:: env;
140+ use std:: fs;
141+ use std:: mem;
142+ use std:: process;
139143 use std:: sync:: atomic:: AtomicU64 ;
144+ use std:: sync:: atomic:: Ordering ;
140145
141146 use super :: * ;
142147 use crate :: atomic_dir:: TempDirApi ;
@@ -158,23 +163,23 @@ pub(crate) mod atomic_dir_imp {
158163 path : & <Self :: Vfs as VfsCore >:: Path ,
159164 ) -> VfsResult < ( ) , Self :: Vfs > {
160165 vfs. create_parent_dir ( path) ?;
161- std :: fs:: rename ( & self . 0 , path) . wrap_io_error_with ( path) ?;
166+ fs:: rename ( & self . 0 , path) . wrap_io_error_with ( path) ?;
162167 // do not run the Drop impl, as we already moved the directory
163- std :: mem:: forget ( self ) ;
168+ mem:: forget ( self ) ;
164169 Ok ( ( ) )
165170 }
166171
167172 fn delete ( self , vfs : Pin < & ' vfs Self :: Vfs > ) -> VfsResult < ( ) , Self :: Vfs > {
168173 vfs. remove_dir_all ( & self . 0 ) ?;
169174 // do not run the Drop impl, as we already deleted the directory
170- std :: mem:: forget ( self ) ;
175+ mem:: forget ( self ) ;
171176 Ok ( ( ) )
172177 }
173178 }
174179
175180 impl Drop for TempDir {
176181 fn drop ( & mut self ) {
177- let _ = std :: fs:: remove_dir_all ( & self . 0 ) ;
182+ let _ = fs:: remove_dir_all ( & self . 0 ) ;
178183 }
179184 }
180185
@@ -202,10 +207,10 @@ pub(crate) mod atomic_dir_imp {
202207 }
203208
204209 pub fn make_new_temp_dir_path ( ) -> PathBuf {
205- std :: env:: temp_dir ( ) . join ( format ! (
210+ env:: temp_dir ( ) . join ( format ! (
206211 "__rust_dir_structure_temp_{}_{}" ,
207- std :: process:: id( ) ,
208- FS_TEMP_DIR_ID . fetch_add( 1 , std :: sync :: atomic :: Ordering :: SeqCst )
212+ process:: id( ) ,
213+ FS_TEMP_DIR_ID . fetch_add( 1 , Ordering :: SeqCst )
209214 ) )
210215 }
211216}
0 commit comments