Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Improve formatting of single quote in Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jan 20, 2023
1 parent 3ff5506 commit 0d9e6c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libyaml/cstr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub(crate) fn debug_lossy(mut bytes: &[u8], formatter: &mut fmt::Formatter) -> f
let mut written = 0;
for (i, ch) in valid.char_indices() {
let esc = ch.escape_debug();
if esc.len() != 1 {
if esc.len() != 1 && ch != '\'' {
formatter.write_str(&valid[written..i])?;
for ch in esc {
formatter.write_char(ch)?;
Expand Down

0 comments on commit 0d9e6c7

Please sign in to comment.