Skip to content

Commit ff2fc3c

Browse files
authored
Merge pull request #215 from alexcrichton/escape
Don't escape_default all non-ascii text
2 parents 903a972 + 8da6698 commit ff2fc3c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/fallback.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -754,10 +754,10 @@ impl Literal {
754754
text.push('"');
755755
for c in t.chars() {
756756
if c == '\'' {
757-
// escape_default turns this into "\'" which is unnecessary.
757+
// escape_debug turns this into "\'" which is unnecessary.
758758
text.push(c);
759759
} else {
760-
text.extend(c.escape_default());
760+
text.extend(c.escape_debug());
761761
}
762762
}
763763
text.push('"');
@@ -768,10 +768,10 @@ impl Literal {
768768
let mut text = String::new();
769769
text.push('\'');
770770
if t == '"' {
771-
// escape_default turns this into '\"' which is unnecessary.
771+
// escape_debug turns this into '\"' which is unnecessary.
772772
text.push(t);
773773
} else {
774-
text.extend(t.escape_default());
774+
text.extend(t.escape_debug());
775775
}
776776
text.push('\'');
777777
Literal::_new(text)

0 commit comments

Comments
 (0)