2020-02-22 23:05:58 -06:00
|
|
|
// rustfmt-use_small_heuristics: Default
|
|
|
|
|
|
|
|
enum Lorem {
|
|
|
|
Ipsum,
|
|
|
|
Dolor(bool),
|
|
|
|
Sit { amet: Consectetur, adipiscing: Elit },
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
lorem(
|
|
|
|
"lorem",
|
|
|
|
"ipsum",
|
|
|
|
"dolor",
|
|
|
|
"sit",
|
|
|
|
"amet",
|
|
|
|
"consectetur",
|
|
|
|
"adipiscing",
|
|
|
|
);
|
|
|
|
|
|
|
|
let lorem = Lorem {
|
|
|
|
ipsum: dolor,
|
|
|
|
sit: amet,
|
|
|
|
};
|
|
|
|
|
|
|
|
let lorem = if ipsum { dolor } else { sit };
|
|
|
|
}
|
2023-07-01 02:49:12 -05:00
|
|
|
|
|
|
|
fn format_let_else() {
|
|
|
|
let Some(a) = opt else {};
|
|
|
|
|
|
|
|
let Some(b) = opt else { return };
|
|
|
|
|
|
|
|
let Some(c) = opt else { return };
|
|
|
|
|
|
|
|
let Some(d) = some_very_very_very_very_long_name else {
|
|
|
|
return;
|
|
|
|
};
|
|
|
|
}
|