forked from BurntSushi/bstr
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a method to the `ExtSlice` trait that supports writing the `BStr` escaped representation into a `fmt::Write`. This enables extracting the escaped `String` into a buffer without going through `fmt::Debug`. The written `String` does not contain the surrounding quotes present in the `fmt::Debug` implementation. Fixes BurntSushiGH-34. This change reimplements `fmt::Debug` for `BStr` with `ExtSlice::escape_debug_into`.
- Loading branch information
Showing
2 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters