Skip to content

Commit

Permalink
Improved clarity of documentation for std::fs::create_dir_all
Browse files Browse the repository at this point in the history
Improved first sentence in second section
  • Loading branch information
rik86189 committed Jun 16, 2024
1 parent 12b33d3 commit 8b5f2cb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions library/std/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2400,17 +2400,17 @@ pub fn create_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
///
/// # Errors
///
/// This function will return an error in the following situations, but is not
/// limited to just these cases:
/// This function will return an error in the following situation, but is not
/// limited to just this case:
///
/// * If any directory in the path specified by `path`
/// does not already exist and it could not be created otherwise. The specific
/// * If any directory specified in `path`
/// does not already exist and could not be created. The specific
/// error conditions for when a directory is being created (after it is
/// determined to not exist) are outlined by [`fs::create_dir`].
///
/// Notable exception is made for situations where any of the directories
/// specified in the `path` could not be created as it was being created concurrently.
/// Such cases are considered to be successful. That is, calling `create_dir_all`
/// Such cases are considered to be successful. Because calling `create_dir_all`
/// concurrently from multiple threads or processes is guaranteed not to fail
/// due to a race condition with itself.
///
Expand Down

0 comments on commit 8b5f2cb

Please sign in to comment.