Closed
Description
What it does
Emits a warning on empty blocks (no statements nor an expression).
Advantage
This is always unnecessary (afaik), and even on the off chance it mutates something else (like potentially in the condition for an if
), the if
can be entirely removed, leaving just the condition.
Drawbacks
None
Example
if i_mutate_a_variable(&mut owo) {}
let _x = {};
Could be written as:
i_mutate_a_variable(&mut owo);
// <removed>