diff options
| author | Daniel Eades <danieleades@hotmail.com> | 2023-01-10 19:51:21 +0000 |
|---|---|---|
| committer | Daniel Eades <danieleades@hotmail.com> | 2023-01-10 19:51:21 +0000 |
| commit | 95fc3ba41cff006a3ae4c3c730122b0503fdefab (patch) | |
| tree | 23bd458b196989ae19ffe9dfa0062076b946a3d6 | |
| parent | 5b1cd8245f64d6501f0866c49e948e2d8a75038a (diff) | |
fixup
| -rw-r--r-- | crates/hir-def/src/body/pretty.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir-def/src/body/pretty.rs b/crates/hir-def/src/body/pretty.rs index 41783081ecd..4b4664a1cf4 100644 --- a/crates/hir-def/src/body/pretty.rs +++ b/crates/hir-def/src/body/pretty.rs @@ -113,7 +113,7 @@ impl<'a> Printer<'a> { } fn newline(&mut self) { - match self.buf.chars().rev().skip_while(|ch| *ch == ' ').next() { + match self.buf.chars().rev().find(|ch| *ch != ' ') { Some('\n') | None => {} _ => writeln!(self).unwrap(), } |
