When using two or more if let chained, rustfmt won't format the code block.
The following code:
fn main() {
if let Some(()) = Option::default() && let Some(()) = Option::default()
{
}
}
Won't be formatted, as expected:
fn main() {
if let Some(()) = Option::default() && let Some(()) = Option::default() {}
}
If using a single if let, everything works fine.
Here is a playground example.
When using two or more
if letchained,rustfmtwon't format the code block.The following code:
Won't be formatted, as expected:
If using a single
if let, everything works fine.Here is a playground example.