mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
267 B
267 B
Assists
convert_to_guarded_return
Replace a large conditional with a guarded return.
// BEFORE
fn main() {
<|>if cond {
foo();
bar();
}
}
// AFTER
fn main() {
if !cond {
return;
}
foo();
bar();
}