cargo fmt

This commit is contained in:
Luke Boswell 2024-04-02 14:47:17 +11:00
parent 69a3a3c477
commit d08a51b134
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
4 changed files with 30 additions and 10 deletions

View file

@ -503,10 +503,21 @@ impl<'a> Formattable for Expr<'a> {
}
}
RecordAccess(expr, key) => {
// Check for any `!` suffixes and format these at the end of expression
let (expr_to_format, suffix_count) = if let Var{module_name, ident, suffixed} = expr {
(Var {module_name, ident, suffixed:0}, suffixed)
let (expr_to_format, suffix_count) = if let Var {
module_name,
ident,
suffixed,
} = expr
{
(
Var {
module_name,
ident,
suffixed: 0,
},
suffixed,
)
} else {
(**expr, &0u8)
};
@ -520,10 +531,21 @@ impl<'a> Formattable for Expr<'a> {
}
}
TupleAccess(expr, key) => {
// Check for any `!` suffixes and format these at the end of expression
let (expr_to_format, suffix_count) = if let Var{module_name, ident, suffixed} = expr {
(Var {module_name, ident, suffixed:0}, suffixed)
let (expr_to_format, suffix_count) = if let Var {
module_name,
ident,
suffixed,
} = expr
{
(
Var {
module_name,
ident,
suffixed: 0,
},
suffixed,
)
} else {
(**expr, &0u8)
};