Given the following code:
struct Foo {
something: Option<u32>,
bar: u32,
}
fn main() {
let a = Foo {
something: Some(1),
bar: 2,
};
if let Foo { something: Some(something), .. } = a {
println!("{}", something);
}
}
rustfmt formats the if let as
if let Foo {
something: Some(something),
..
} = a
{
println!("{}", something);
}
which looks rather unfortunate...
Should probably keep the original form in this case?
Given the following code:
rustfmt formats the
if letaswhich looks rather unfortunate...
Should probably keep the original form in this case?