From c32e4ba60abe2e3868da91f6d2bee1d889f36abe Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sat, 7 Aug 2021 10:14:41 +0200 Subject: [PATCH] Document that fs::read_dir skips . and .. --- library/std/src/fs.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index e1ad46961c025..2c04481c04ec0 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -2039,6 +2039,8 @@ pub fn remove_dir_all>(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 ///