Light fixes (#2455)

* Add optional commas for items in lists and tables

* A couple last fixes
This commit is contained in:
Jonathan Turner
2020-08-30 19:03:18 +12:00
committed by GitHub
parent abc05ece21
commit df691c6c91
3 changed files with 44 additions and 2 deletions

View File

@ -142,8 +142,8 @@ impl PrettyDebug for FormatInlineShape {
let (right, right_inclusion) = &range.to;
let op = match (left_inclusion, right_inclusion) {
(RangeInclusion::Inclusive, RangeInclusion::Exclusive) => "..",
_ => unimplemented!("No syntax for ranges that aren't inclusive on the left and exclusive on the right")
(RangeInclusion::Inclusive, RangeInclusion::Inclusive) => "..",
_ => unimplemented!("No syntax for ranges that aren't inclusive on the left and inclusive on the right")
};
left.clone().format().pretty() + b::operator(op) + right.clone().format().pretty()