about summary refs log tree commit diff
path: root/library/std/src/fs.rs
diff options
context:
space:
mode:
authorbinarycat <binarycat@envs.net>2024-07-11 15:44:58 -0400
committerbinarycat <binarycat@envs.net>2024-08-22 14:18:42 -0400
commit736f773844e7ebf05ccb827c17b7ad9eb28aa295 (patch)
tree43d80bc940926d94ecc0299410d688d4677d3424 /library/std/src/fs.rs
parent53676730146e38e4697b6204c2ee61a9fd6b7e51 (diff)
downloadrust-736f773844e7ebf05ccb827c17b7ad9eb28aa295.tar.gz
rust-736f773844e7ebf05ccb827c17b7ad9eb28aa295.zip
fix: fs::remove_dir_all: treat ENOENT as success
fixes #127576

windows implementation still needs some work
Diffstat (limited to 'library/std/src/fs.rs')
-rw-r--r--library/std/src/fs.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs
index c5edb03bb08..6a0d9f47960 100644
--- a/library/std/src/fs.rs
+++ b/library/std/src/fs.rs
@@ -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
 ///