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

Odd documentation entry for Event::is_err() #203

Closed
pfumagalli opened this issue May 28, 2024 · 2 comments · Fixed by #204
Closed

Odd documentation entry for Event::is_err() #203

pfumagalli opened this issue May 28, 2024 · 2 comments · Fixed by #204

Comments

@pfumagalli
Copy link
Contributor

In the docs for Event::is_err()

polling/src/lib.rs

Lines 413 to 414 in cf2d60e

/// Returns `Some(true)` if the connection has failed, `Some(false)` if there is an error,
/// or `None` if the platform does not support detecting this condition.

it is stated:

Returns Some(true) if the connection has failed, Some(false) if there is an error,
or None if the platform does not support detecting this condition.

I assume it should say

[...] Some(false) if there is no error, [...]

In the various implementations I can see that the check is normally

Some(self.flags.contains(epoll::EventFlags::ERR))

So I assume my understanding is correct?

@notgull
Copy link
Member

notgull commented May 28, 2024

I would accept a PR to fix this.

pfumagalli added a commit to pfumagalli/polling that referenced this issue May 28, 2024
@pfumagalli
Copy link
Contributor Author

You got it, #204

Thanks!

notgull added a commit that referenced this issue May 30, 2024
Closes #203

Co-authored-by: John Nunley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants