Fix type-parameter pretty printing (use chevrons)

This commit is contained in:
KtorZ 2022-12-16 19:46:16 +01:00
parent d2c6d27545
commit b323c95241
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
2 changed files with 4 additions and 4 deletions

View File

@ -1222,7 +1222,7 @@ impl<'comments> Formatter<'comments> {
name.to_doc() name.to_doc()
} else { } else {
name.to_doc() name.to_doc()
.append(wrap_args(args.iter().map(|e| (e.to_doc(), false)))) .append(wrap_generics(args.iter().map(|e| e.to_doc())).group())
} }
} }

View File

@ -61,9 +61,9 @@ impl Printer {
if args.is_empty() { if args.is_empty() {
doc doc
} else { } else {
doc.append("(") doc.append("<")
.append(self.args_to_aiken_doc(args)) .append(self.args_to_aiken_doc(args))
.append(")") .append(">")
} }
} }
@ -298,7 +298,7 @@ mod test {
}), }),
], ],
}, },
"Pair(Int, Bool)", "Pair<Int, Bool>",
); );
assert_string!( assert_string!(
Type::Fn { Type::Fn {