Fix indentation of pipelines.

This commit is contained in:
KtorZ
2024-03-09 20:44:51 +01:00
parent 6ba74125c7
commit 37627e3527
6 changed files with 13 additions and 16 deletions

View File

@@ -1244,7 +1244,7 @@ impl<'comments> Formatter<'comments> {
let expr = self
.operator_side(doc, 4, expr.binop_precedence())
.nest(2 * INDENT + 1);
.nest(2 * INDENT);
match printed_comments(comments, true) {
None => {
@@ -1842,11 +1842,7 @@ impl<'a> Documentable<'a> for &'a ArgName {
}
fn pub_(public: bool) -> Document<'static> {
if public {
"pub ".to_doc()
} else {
nil()
}
if public { "pub ".to_doc() } else { nil() }
}
impl<'a> Documentable<'a> for &'a UnqualifiedImport {

View File

@@ -5,9 +5,8 @@ description: "Code:\n\nfn foo() {\n outputs\n |> list.any(\n fn(output) {
fn foo() {
outputs
|> list.any(
fn(output) {
value.quantity_of(output.value, policy_id, asset_name) == 1
},
)
fn(output) {
value.quantity_of(output.value, policy_id, asset_name) == 1
},
)
}