Code action suggestion: add / remove braces of closure
Author: TonalidadeHidricaCreated Mar 31, 2021Updated Sep 27, 2026
LabelsS-actionableA-assists
It would be nice if there is a code action which removes or adds curly braces of the closure. i.e.
vec.iter().filter(|x| x % 2 == 0)becomes
vec.iter().filter(|x| {
x % 2 == 0
})or vice versa.
Source: rust-lang/rust-analyzer