Invoke `f` while indenting one level greater than `self` currently does.
(&mut self, f: impl FnOnce(&mut Self) -> Res)
| 53 | |
| 54 | /// Invoke `f` while indenting one level greater than `self` currently does. |
| 55 | pub fn with_indent<Res>(&mut self, f: impl FnOnce(&mut Self) -> Res) -> Res { |
| 56 | let mut indenter = self.indented(1); |
| 57 | f(&mut indenter) |
| 58 | } |
| 59 | |
| 60 | // Writes a newline without setting the `needs_indenting` flag. |
| 61 | // TODO(cloutiertyler): I think it should set the flag, but I don't know |
no test coverage detected