{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreicps2xtfcbcymenbnkayemucj5frk5suapnfc2uc3l34mqzgmqdya",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mgwckx74xxz2"
  },
  "path": "/t/stop-including-string-content-in-index-panics/24067#post_11",
  "publishedAt": "2026-03-13T03:48:38.000Z",
  "site": "https://internals.rust-lang.org",
  "tags": [
    "appears to print those both literally"
  ],
  "textContent": "ais523:\n\n> Most commonly this includes terminal control characters like U+001B and U+009B, and Rust appears to print those both literally at present when a string operation produces a panic.\n\nThis is an interesting point. As a consequence, I’d pose it may be a good idea for the string to be `Debug`-printed (i.e. escaped) – rather than `Display`-printed as currently seems to be the case – thus behaving similar to e.q. what a failed `assert_eq!(\"ab\\u{1b}c\\n\\n\\nd\\u{9b}ef\", \"something else\")` would do (it also uses the `Debug`-printed representation of the string).",
  "title": "Stop including string content in index panics?"
}