Use explict escape_default instead of dbg print

This commit is contained in:
Edwin Cheng 2019-05-04 17:03:22 +08:00
parent e7e896170a
commit 048f12d9f0

View File

@ -135,7 +135,7 @@ fn doc_comment_text(comment: &ast::Comment) -> SmolStr {
// Quote the string
// Note that `tt::Literal` expect an escaped string
let text = format!("{:?}", text);
let text = format!("\"{}\"", text.escape_default());
text.into()
}