mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 20:28:02 +00:00
cargo fmt
This commit is contained in:
parent
69a3a3c477
commit
d08a51b134
4 changed files with 30 additions and 10 deletions
|
@ -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)
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue