Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
impl: fix formatting of control characters \x1a through \x1f in Debug…
… impl Due to an incorrect range, control characters \x1a through \x1f get formatted as Unicode \u escapes rather than hex \x escapes. This commit fixes the range, adds a test and switches over to std's `escape_ascii` to do more of the formatting work. Without the fix, the test fails like this: ``` left: "\"\\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x11\\x12\\r\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f \\x7f\\x80\\x81\\xfe\\xff\"" right: "\"\\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x11\\x12\\r\\x14\\x15\\x16\\x17\\x18\\x19\\u{1a}\\u{1b}\\u{1c}\\u{1d}\\u{1e}\\u{1f} \\x7f\\x80\\x81\\xfe\\xff\"" ``` PR #201
- Loading branch information