[meta] Fix outdented_line in srcgen;
This commit is contained in:
@@ -80,9 +80,9 @@ impl Formatter {
|
||||
/// Get a string containing whitespace outdented one level. Used for
|
||||
/// lines of code that are inside a single indented block.
|
||||
fn _get_outdent(&mut self) -> String {
|
||||
self.indent_push();
|
||||
let s = self.get_indent();
|
||||
self.indent_pop();
|
||||
let s = self.get_indent();
|
||||
self.indent_push();
|
||||
s
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ impl Formatter {
|
||||
|
||||
/// Emit a line outdented one level.
|
||||
pub fn _outdented_line(&mut self, s: &str) {
|
||||
let new_line = format!("{}{}", self._get_outdent(), s);
|
||||
let new_line = format!("{}{}\n", self._get_outdent(), s);
|
||||
self.lines.push(new_line);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user