You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lint on code calling io::Error::new with io::ErrorKind::Other as the kind argument, because you can replace it with a call to io::Error::other.
Advantage
More concise
Drawbacks
Adding this lint would require people to change their code, adding work (though this should be machine-applicable) and adding diff churn to repository histories.
What it does
Lint on code calling
io::Error::new
withio::ErrorKind::Other
as thekind
argument, because you can replace it with a call toio::Error::other
.Advantage
More concise
Drawbacks
Adding this lint would require people to change their code, adding work (though this should be machine-applicable) and adding diff churn to repository histories.
Example
Could be written as:
(which then gets another lint to also cut out the closure, so the code is even simpler).
The text was updated successfully, but these errors were encountered: