Function clippy_utils::peel_blocks
source · Expand description
Removes blocks around an expression, only if the block contains just one expression and no statements. Unsafe blocks are not removed.
Examples:
{}->{}{ x }->x{{ x }}->x{ x; }->{ x; }{ x; y }->{ x; y }{ unsafe { x } }->unsafe { x }