File tree 1 file changed +2
-24
lines changed
1 file changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ impl Filesystem {
141
141
/// Handles errors where other Cargo processes are also attempting to
142
142
/// concurrently create this directory.
143
143
pub fn create_dir ( & self ) -> io:: Result < ( ) > {
144
- create_dir_all ( & self . root )
144
+ fs :: create_dir_all ( & self . root )
145
145
}
146
146
147
147
/// Returns an adaptor that can be used to print the path of this
@@ -211,7 +211,7 @@ impl Filesystem {
211
211
let f = opts. open ( & path)
212
212
. or_else ( |e| {
213
213
if e. kind ( ) == io:: ErrorKind :: NotFound && state == State :: Exclusive {
214
- create_dir_all ( path. parent ( ) . unwrap ( ) ) ?;
214
+ fs :: create_dir_all ( path. parent ( ) . unwrap ( ) ) ?;
215
215
opts. open ( & path)
216
216
} else {
217
217
Err ( e)
@@ -344,25 +344,3 @@ fn acquire(
344
344
false
345
345
}
346
346
}
347
-
348
- fn create_dir_all ( path : & Path ) -> io:: Result < ( ) > {
349
- match create_dir ( path) {
350
- Ok ( ( ) ) => Ok ( ( ) ) ,
351
- Err ( e) => {
352
- if e. kind ( ) == io:: ErrorKind :: NotFound {
353
- if let Some ( p) = path. parent ( ) {
354
- return create_dir_all ( p) . and_then ( |( ) | create_dir ( path) ) ;
355
- }
356
- }
357
- Err ( e)
358
- }
359
- }
360
- }
361
-
362
- fn create_dir ( path : & Path ) -> io:: Result < ( ) > {
363
- match fs:: create_dir ( path) {
364
- Ok ( ( ) ) => Ok ( ( ) ) ,
365
- Err ( ref e) if e. kind ( ) == io:: ErrorKind :: AlreadyExists => Ok ( ( ) ) ,
366
- Err ( e) => Err ( e) ,
367
- }
368
- }
You can’t perform that action at this time.
0 commit comments