fix: fs::remove_dir_all: treat ENOENT as success

fixes #127576

windows implementation still needs some work
This commit is contained in:
binarycat
2024-07-11 15:44:58 -04:00
parent 5367673014
commit 736f773844
8 changed files with 153 additions and 36 deletions

View File

@@ -2491,6 +2491,8 @@ pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
///
/// Consider ignoring the error if validating the removal is not required for your use case.
///
/// [`io::ErrorKind::NotFound`] is only returned if no removal occurs.
///
/// [`fs::remove_file`]: remove_file
/// [`fs::remove_dir`]: remove_dir
///