-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-feature-acceptedCategory: A feature request that has been accepted pending implementation.Category: A feature request that has been accepted pending implementation.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
OsStr
implements fmt::Debug
:
- On Unix, using
to_lossy_str
, thenfmt::Debug::fmt
on the resultingString
, which escapes all control or non-ASCII characters. - On Windows, it eventually calls an
impl
I originally wrote for rust-wft8, which is lossless but only escapes surrogate code points. In particular, it happily prints control characters.
So there are two issues: they should be consistent across platforms, and is it OK for a Debug
impl to be lossy?
CC @aturon, @alexcrichton
Metadata
Metadata
Assignees
Labels
C-feature-acceptedCategory: A feature request that has been accepted pending implementation.Category: A feature request that has been accepted pending implementation.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.