Fix some pretty printing indents.
Indents for `cbox` and `ibox` are 0 or `INDENT_UNIT` (4) except for a couple of places which are `INDENT_UNIT - 1` for no clear reason. This commit changes the three space indents to four spaces.
This commit is contained in:
@@ -21,7 +21,7 @@ impl<'a> State<'a> {
|
|||||||
match &_else.kind {
|
match &_else.kind {
|
||||||
// Another `else if` block.
|
// Another `else if` block.
|
||||||
ast::ExprKind::If(i, then, e) => {
|
ast::ExprKind::If(i, then, e) => {
|
||||||
self.cbox(INDENT_UNIT - 1);
|
self.cbox(INDENT_UNIT);
|
||||||
self.ibox(0);
|
self.ibox(0);
|
||||||
self.word(" else if ");
|
self.word(" else if ");
|
||||||
self.print_expr_as_cond(i);
|
self.print_expr_as_cond(i);
|
||||||
@@ -31,7 +31,7 @@ impl<'a> State<'a> {
|
|||||||
}
|
}
|
||||||
// Final `else` block.
|
// Final `else` block.
|
||||||
ast::ExprKind::Block(b, _) => {
|
ast::ExprKind::Block(b, _) => {
|
||||||
self.cbox(INDENT_UNIT - 1);
|
self.cbox(INDENT_UNIT);
|
||||||
self.ibox(0);
|
self.ibox(0);
|
||||||
self.word(" else ");
|
self.word(" else ");
|
||||||
self.print_block(b)
|
self.print_block(b)
|
||||||
|
|||||||
@@ -1065,7 +1065,7 @@ impl<'a> State<'a> {
|
|||||||
match els_inner.kind {
|
match els_inner.kind {
|
||||||
// Another `else if` block.
|
// Another `else if` block.
|
||||||
hir::ExprKind::If(i, then, e) => {
|
hir::ExprKind::If(i, then, e) => {
|
||||||
self.cbox(INDENT_UNIT - 1);
|
self.cbox(INDENT_UNIT);
|
||||||
self.ibox(0);
|
self.ibox(0);
|
||||||
self.word(" else if ");
|
self.word(" else if ");
|
||||||
self.print_expr_as_cond(i);
|
self.print_expr_as_cond(i);
|
||||||
@@ -1075,7 +1075,7 @@ impl<'a> State<'a> {
|
|||||||
}
|
}
|
||||||
// Final `else` block.
|
// Final `else` block.
|
||||||
hir::ExprKind::Block(b, _) => {
|
hir::ExprKind::Block(b, _) => {
|
||||||
self.cbox(INDENT_UNIT - 1);
|
self.cbox(INDENT_UNIT);
|
||||||
self.ibox(0);
|
self.ibox(0);
|
||||||
self.word(" else ");
|
self.word(" else ");
|
||||||
self.print_block(b);
|
self.print_block(b);
|
||||||
|
|||||||
Reference in New Issue
Block a user