Skip to content

Commit 63631fb

Browse files
Rollup merge of #142452 - ChrisDenton:intermittent, r=Noratrieb
Remove "intermittent" wording from `ReadDir` `ReadDir` claims that `next` will return an error "if there’s some sort of intermittent IO error during iteration". I'm really not sure what this was intended to mean but the implementations will simply return all OS errors encountered during iteration to the user. What else can they do? This is technically a change in the documented API but seeing as how it doesn't bear any relationship with the implementation I don't think it needs a libs-api fcp.
2 parents 4d1ded8 + ae645fc commit 63631fb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

library/std/src/fs.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,8 @@ pub struct Metadata(fs_imp::FileAttr);
153153
/// dependent.
154154
///
155155
/// # Errors
156-
///
157-
/// This [`io::Result`] will be an [`Err`] if there's some sort of intermittent
158-
/// IO error during iteration.
156+
/// This [`io::Result`] will be an [`Err`] if an error occurred while fetching
157+
/// the next entry from the OS.
159158
#[stable(feature = "rust1", since = "1.0.0")]
160159
#[derive(Debug)]
161160
pub struct ReadDir(fs_imp::ReadDir);

0 commit comments

Comments
 (0)