diff options
| author | bors <bors@rust-lang.org> | 2017-08-23 03:24:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-08-23 03:24:13 +0000 |
| commit | 528307ab1cedc31fd8e6cc647483c986f3258ad0 (patch) | |
| tree | d1ecaeec197408f60c72d2658c517b0c5b71b5c8 /src/libstd/sys/unix/process/process_unix.rs | |
| parent | 1682f9d099ef223e8026340b6040a1697a30ef94 (diff) | |
| parent | 742ca0caf25813ee30b70d9e29ab3eacb0076302 (diff) | |
| download | rust-528307ab1cedc31fd8e6cc647483c986f3258ad0.tar.gz rust-528307ab1cedc31fd8e6cc647483c986f3258ad0.zip | |
Auto merge of #43830 - alexcrichton:path-display-regression, r=aturon
std: Respect formatting flags for str-like OsStr 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
Diffstat (limited to 'src/libstd/sys/unix/process/process_unix.rs')
0 files changed, 0 insertions, 0 deletions
