Delete fields from struct literals that have a base (default) expression
sourcefrog opened this issue · comments
let cat = Cat {
name: "Felix",
coat: Coat::Tuxedo,
..Default::default()
};
We could try deleting name
and age
in two separate mutations.
https://doc.rust-lang.org/reference/expressions/struct-expr.html
Default::default()
is the most common expression but there are cases where it's something else.