Fix type-parameter pretty printing (use chevrons)
This commit is contained in:
parent
d2c6d27545
commit
b323c95241
|
@ -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())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue