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
We definitely should have this. But I have a feeling that bool::then is "a little too functional" for some people and so it should not warn-by-default. So either pedantic or restriction. I would lean towards restriction.
What it does
Checks for if-else that could be rewritten to
bool::then
Categories (optional)
stylerestrictionReduces redundancy and lines of code by leveraging a new stable API
bool::then
Drawbacks
None.
Example
Could be written as:
Note that the following cannot be rewritten using
bool::then
because it has some action inelse
block:The text was updated successfully, but these errors were encountered: