Commit a49ae1c
authored
Rollup merge of rust-lang#141472 - fluiderson:dev, r=workingjubilee
Attempt to improve the `std::fs::create_dir_all` docs related to atomicity
The original paragraph was added in rust-lang#124520. It doesn't match the actual code logic. It says "function returns an error" if "the parent components" _(which also implies directories)_ "have been created already". The code is as follows:
https://github.com/rust-lang/rust/blob/e88e85463468ce5d5ce468414eb69e3b15fa8d42/library/std/src/fs.rs#L3146
https://github.com/rust-lang/rust/blob/e88e85463468ce5d5ce468414eb69e3b15fa8d42/library/std/src/fs.rs#L3160
These lines suppress all errors if any path component is a directory. I've updated the paragraph to mirror this.1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2803 | 2803 | | |
2804 | 2804 | | |
2805 | 2805 | | |
2806 | | - | |
2807 | | - | |
| 2806 | + | |
| 2807 | + | |
2808 | 2808 | | |
2809 | 2809 | | |
2810 | 2810 | | |
| |||
0 commit comments