aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/item_tree
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-06-17 16:37:14 +0100
committerLukas Wirth <[email protected]>2021-06-17 16:37:14 +0100
commit95c8c65139c10e4de44367fead8dff88511e6d46 (patch)
tree4326d46ee282c133123f3a08aaee7d640f007050 /crates/hir_def/src/item_tree
parentc82a9141abe6b6cbf5b55710dc8a315a3839081b (diff)
Nest all the or-patterns!
Diffstat (limited to 'crates/hir_def/src/item_tree')
-rw-r--r--crates/hir_def/src/item_tree/pretty.rs4
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 }