File tree Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ impl Filesystem {
141141 /// Handles errors where other Cargo processes are also attempting to
142142 /// concurrently create this directory.
143143 pub fn create_dir ( & self ) -> io:: Result < ( ) > {
144- create_dir_all ( & self . root )
144+ fs :: create_dir_all ( & self . root )
145145 }
146146
147147 /// Returns an adaptor that can be used to print the path of this
@@ -211,7 +211,7 @@ impl Filesystem {
211211 let f = opts. open ( & path)
212212 . or_else ( |e| {
213213 if e. kind ( ) == io:: ErrorKind :: NotFound && state == State :: Exclusive {
214- create_dir_all ( path. parent ( ) . unwrap ( ) ) ?;
214+ fs :: create_dir_all ( path. parent ( ) . unwrap ( ) ) ?;
215215 opts. open ( & path)
216216 } else {
217217 Err ( e)
@@ -344,25 +344,3 @@ fn acquire(
344344 false
345345 }
346346}
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