diff options
Diffstat (limited to 'crates/hir_def/src/item_tree/pretty.rs')
-rw-r--r-- | crates/hir_def/src/item_tree/pretty.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_def/src/item_tree/pretty.rs b/crates/hir_def/src/item_tree/pretty.rs index b1e1b70d0..e63bc8232 100644 --- a/crates/hir_def/src/item_tree/pretty.rs +++ b/crates/hir_def/src/item_tree/pretty.rs | |||
@@ -63,7 +63,7 @@ impl<'a> Printer<'a> { | |||
63 | fn blank(&mut self) { | 63 | fn blank(&mut self) { |
64 | let mut iter = self.buf.chars().rev().fuse(); | 64 | let mut iter = self.buf.chars().rev().fuse(); |
65 | match (iter.next(), iter.next()) { | 65 | match (iter.next(), iter.next()) { |
66 | (Some('\n'), Some('\n')) | (Some('\n'), None) | (None, None) => {} | 66 | (Some('\n'), Some('\n') | None) | (None, None) => {} |
67 | (Some('\n'), Some(_)) => { | 67 | (Some('\n'), Some(_)) => { |
68 | self.buf.push('\n'); | 68 | self.buf.push('\n'); |
69 | } | 69 | } |
@@ -77,7 +77,7 @@ impl<'a> Printer<'a> { | |||
77 | 77 | ||
78 | fn whitespace(&mut self) { | 78 | fn whitespace(&mut self) { |
79 | match self.buf.chars().next_back() { | 79 | match self.buf.chars().next_back() { |
80 | None | Some('\n') | Some(' ') => {} | 80 | None | Some('\n' | ' ') => {} |
81 | _ => self.buf.push(' '), | 81 | _ => self.buf.push(' '), |
82 | } | 82 | } |
83 | } | 83 | } |