about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.si>2021-08-07 10:14:41 +0200
committerTimotej Lazar <timotej.lazar@araneo.si>2021-08-07 10:14:41 +0200
commitc32e4ba60abe2e3868da91f6d2bee1d889f36abe (patch)
tree08d20a1e3293392039e6aee56482b1f0036deff8
parent996ff2e0a0f911f52bb1de6bdd0cfd5704de1fc9 (diff)
downloadrust-c32e4ba60abe2e3868da91f6d2bee1d889f36abe.tar.gz
rust-c32e4ba60abe2e3868da91f6d2bee1d889f36abe.zip
Document that fs::read_dir skips . and ..
-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 e1ad46961c0..2c04481c04e 100644
--- a/library/std/src/fs.rs
+++ b/library/std/src/fs.rs
@@ -2039,6 +2039,8 @@ pub fn remove_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
 ///
 /// The iterator will yield instances of [`io::Result`]`<`[`DirEntry`]`>`.
 /// New errors may be encountered after an iterator is initially constructed.
+/// Entries for the current and parent directories (typically `.` and `..`) are
+/// skipped.
 ///
 /// # Platform-specific behavior
 ///