Skip to content

Commit 8b5f2cb

Browse files
committedJun 16, 2024·
Improved clarity of documentation for std::fs::create_dir_all
Improved first sentence in second section
1 parent 12b33d3 commit 8b5f2cb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎library/std/src/fs.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2400,17 +2400,17 @@ pub fn create_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
24002400
///
24012401
/// # Errors
24022402
///
2403-
/// This function will return an error in the following situations, but is not
2404-
/// limited to just these cases:
2403+
/// This function will return an error in the following situation, but is not
2404+
/// limited to just this case:
24052405
///
2406-
/// * If any directory in the path specified by `path`
2407-
/// does not already exist and it could not be created otherwise. The specific
2406+
/// * If any directory specified in `path`
2407+
/// does not already exist and could not be created. The specific
24082408
/// error conditions for when a directory is being created (after it is
24092409
/// determined to not exist) are outlined by [`fs::create_dir`].
24102410
///
24112411
/// Notable exception is made for situations where any of the directories
24122412
/// specified in the `path` could not be created as it was being created concurrently.
2413-
/// Such cases are considered to be successful. That is, calling `create_dir_all`
2413+
/// Such cases are considered to be successful. Because calling `create_dir_all`
24142414
/// concurrently from multiple threads or processes is guaranteed not to fail
24152415
/// due to a race condition with itself.
24162416
///

0 commit comments

Comments
 (0)