We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
According to the Rust API Guidelines:
The error message given by the Display representation of an error type should be lowercase without trailing punctuation, and typically concise.
Clippy could make sure that error message are lowercase without trailing punctuation, by checking
Display
Error
.ok_or("error message")
.map_err(|_| "error message")
misformatted_error_message
style
An error message that conforms to the official guidelines fits more easily into the ecosystem
No response
.ok_or_else(|| format!("Unknown wifescore or grade `{}`!", threshold_str))?
Could be written as:
.ok_or_else(|| format!("unknown wifescore or grade `{}`", threshold_str))?
The text was updated successfully, but these errors were encountered:
Just noticed this suggestion is indirectly included in #1798
Sorry, something went wrong.
No branches or pull requests
What it does
According to the Rust API Guidelines:
Clippy could make sure that error message are lowercase without trailing punctuation, by checking
Display
impl on types that have anError
impl.ok_or("error message")
,.map_err(|_| "error message")
and similar methodsLint Name
misformatted_error_message
Category
style
Advantage
An error message that conforms to the official guidelines fits more easily into the ecosystem
Drawbacks
No response
Example
Could be written as:
The text was updated successfully, but these errors were encountered: