Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment on when ReadDir is Err #23529

Merged
merged 1 commit into from
Mar 20, 2015
Merged

Comment on when ReadDir is Err #23529

merged 1 commit into from
Mar 20, 2015

Conversation

steveklabnik
Copy link
Member

Fixes #23426

@rust-highfive
Copy link
Contributor

r? @pcwalton

(rust_highfive has picked a reviewer for you, use r? to override)

/// # Failure
///
/// This `io::Result` will be an `Err` if there's some problem reading the
/// directory, for example, if it does not exist.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this may not be quite the error that we're looking for because a nonexistent directory should return an error from the initial read_dir function call, not halfway through iteration. I haven't been able to find some great documentation on when this can fail or not, but I think it's fine to just say something about intermittent I/O errors perhaps.

@steveklabnik
Copy link
Member Author

@alexcrichton fair enough, updated!

@alexcrichton
Copy link
Member

@bors: r+ 3e3408d

Manishearth added a commit to Manishearth/rust that referenced this pull request Mar 20, 2015
@bors bors merged commit 3e3408d into rust-lang:master Mar 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

std::fs::ReadDir documentation doesn't say why it can yield Err
5 participants