summary refs log tree commit diff
path: root/src/libstd_unicode/lossy.rs
AgeCommit message (Collapse)AuthorLines
2017-11-22Add missing Debug impls to std_unicodeOliver Middleton-0/+1
Also adds #![deny(missing_debug_implementations)] so they don't get missed again.
2017-08-13std: Respect formatting flags for str-like OsStrAlex Crichton-2/+16
Historically many `Display` and `Debug` implementations for `OsStr`-like abstractions have gone through `String::from_utf8_lossy`, but this was updated in #42613 to use an internal `Utf8Lossy` abstraction instead. This had the unfortunate side effect of causing a regression (#43765) in code which relied on these `fmt` trait implementations respecting the various formatting flags specified. This commit opportunistically adds back interpretation of formatting trait flags in the "common case" where where `OsStr`-like "thing" is all valid utf-8 and can delegate to the formatting implementation for `str`. This doesn't entirely solve the regression as non-utf8 paths will format differently than they did before still (in that they will not respect formatting flags), but this should solve the regression for all "real world" use cases of paths and such. The door's also still open for handling these flags in the future! Closes #43765
2017-06-15Utf8Lossy type with chunks iterator and impl Display and DebugStepan Koltsov-0/+198