diff options
| author | bors <bors@rust-lang.org> | 2014-07-15 18:41:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-07-15 18:41:05 +0000 |
| commit | b422373d862082b1a27bd7d0e2319a31ad745aae (patch) | |
| tree | f0728d449ed0b611c7d49d991209388f3b3a518f /src/libstd/path | |
| parent | cd54321c085da9e40dd340b738547f7287e3c579 (diff) | |
| parent | 584fbde5d1f9e0048592b44195263dfea0ee8231 (diff) | |
| download | rust-b422373d862082b1a27bd7d0e2319a31ad745aae.tar.gz rust-b422373d862082b1a27bd7d0e2319a31ad745aae.zip | |
auto merge of #15426 : aochagavia/rust/str, r=alexcrichton
* Deprecated `str::from_utf8_owned` in favor of `String::from_utf8` * Deprecated `str::from_utf8_lossy` in favor of `String::from_utf8_lossy` * Deprecated `str::from_utf16` in favor of `String::from_utf16` * Deprecated `str::from_utf16_lossy` in favor of `String::from_utf16_lossy` * Deprecated `str::from_chars` in favor of `String::from_chars` * Deprecated `str::from_char` in favor of `String::from_char` and `.to_string()` * Deprecated `str::from_byte` in favor of `String::from_byte` [breaking-change]
Diffstat (limited to 'src/libstd/path')
| -rw-r--r-- | src/libstd/path/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/path/mod.rs b/src/libstd/path/mod.rs index 7d814df8ebf..ececfab5f74 100644 --- a/src/libstd/path/mod.rs +++ b/src/libstd/path/mod.rs @@ -72,7 +72,7 @@ use fmt; use iter::Iterator; use option::{Option, None, Some}; use str; -use str::{MaybeOwned, Str, StrSlice, from_utf8_lossy}; +use str::{MaybeOwned, Str, StrSlice}; use string::String; use slice::Vector; use slice::{ImmutableEqVector, ImmutableVector}; @@ -483,7 +483,7 @@ impl<'a, P: GenericPath> Display<'a, P> { /// unicode replacement char. This involves allocation. #[inline] pub fn as_maybe_owned(&self) -> MaybeOwned<'a> { - from_utf8_lossy(if self.filename { + String::from_utf8_lossy(if self.filename { match self.path.filename() { None => &[], Some(v) => v |
