Function clippy_utils::peel_blocks_with_stmt
source · Expand description
Removes blocks around an expression, only if the block contains just one expression or just one expression statement with a semicolon. Unsafe blocks are not removed.
Examples:
{}->{}{ x }->x{ x; }->x{{ x; }}->x{ x; y }->{ x; y }{ unsafe { x } }->unsafe { x }