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

Lint usage of Result<T, ()> #1721

Closed
clarfonthey opened this issue May 2, 2017 · 3 comments · Fixed by #6157
Closed

Lint usage of Result<T, ()> #1721

clarfonthey opened this issue May 2, 2017 · 3 comments · Fixed by #6157

Comments

@clarfonthey
Copy link
Contributor

A more-descriptive error type should be used instead.

This could probably be limited to just traits like FromStr.

@clarfonthey
Copy link
Contributor Author

Note: servo/rust-url#299 is an example of this in the wild.

@TedDriggs
Copy link

For FromStr implementations for enums with unit variants, what would the more useful error here be?

@clarfonthey
Copy link
Contributor Author

@TedDriggs a unit error struct that implements Error

@clarfonthey clarfonthey changed the title Lint usage of () as an error for Result Lint usage of Result<T, ()> Jun 10, 2017
@llogiq llogiq mentioned this issue Oct 11, 2020
6 tasks
@bors bors closed this as completed in 92783e3 Oct 11, 2020
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 a pull request may close this issue.

2 participants