diff options
| author | Adolfo OchagavĂa <aochagavia92@gmail.com> | 2014-07-10 18:21:16 +0200 |
|---|---|---|
| committer | Adolfo OchagavĂa <aochagavia92@gmail.com> | 2014-07-15 19:55:21 +0200 |
| commit | c6b82c7566a2e1da7d0f1697335b47c8c999720e (patch) | |
| tree | e2d131432e0f2ad7d1fe56a846feeab03df1791a /src/libstd/path | |
| parent | 1900abdd9b5b5eef5d90b43555c1ae06743e50db (diff) | |
| download | rust-c6b82c7566a2e1da7d0f1697335b47c8c999720e.tar.gz rust-c6b82c7566a2e1da7d0f1697335b47c8c999720e.zip | |
Deprecate `str::from_utf8_lossy`
Use `String::from_utf8_lossy` instead [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 |
