-
Notifications
You must be signed in to change notification settings - Fork 1.6k
False positive 'option-map-unit-fn' for std::process::exit #5180
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
Comments
The unit functions refers to the return value, not the param. |
I see, that makes more sense. That wasn't very clear from the suggestion, maybe it could say 'f is a function returning unit type' instead? |
Improve error messages for {option,result}_map_unit_fn Instead of saying "unit function", use the phrase the description uses: "function that returns the unit type". Fixes #5180. changelog: Improve error messages for {option,result}_map_unit_fn
That PR (#5292) didn't address my main concern, which is that 'unit function' is not very clear. Can this be reopened? |
#5290 addressed this comment #5180 (comment) With #5292, this issue should be resolved completely, right? |
Oops, I didn't notice that #5290 had been merged. In that case I'm happy with the fix :) |
Improve placeholder in map_unit_fn Instead of using `_` as a default placeholder use `a`. fixes #5180 changelog: Improve default placeholder in map_unit_fn
This suggestion makes no sense: you can't pass
_
to a function. Furthermore,exit()
is not a unit function, it takesi32
.cargo clippy -V
:clippy 0.0.212 (e8642c7 2020-01-06)
(but also happens in stable)The text was updated successfully, but these errors were encountered: