Skip to content

Commit

Permalink
Minor style improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethiraric committed Jul 7, 2024
1 parent 8f90d2c commit f76e297
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ impl<'a> YamlEmitter<'a> {
fn emit_literal_block(&mut self, v: &str) -> EmitResult {
let ends_with_newline = v.ends_with('\n');
if ends_with_newline {
write!(self.writer, "|")?;
self.writer.write_str("|")?;
} else {
write!(self.writer, "|-")?;
self.writer.write_str("|-")?;
}

self.level += 1;
Expand All @@ -264,7 +264,7 @@ impl<'a> YamlEmitter<'a> {
writeln!(self.writer)?;
self.write_indent()?;
// It's literal text, so don't escape special chars.
write!(self.writer, "{line}")?;
self.writer.write_str(line)?;
}
self.level -= 1;
Ok(())
Expand Down

0 comments on commit f76e297

Please sign in to comment.