diff options
| author | Adolfo OchagavĂa <aochagavia92@gmail.com> | 2014-06-30 16:41:30 +0200 |
|---|---|---|
| committer | Adolfo OchagavĂa <aochagavia92@gmail.com> | 2014-07-15 19:55:17 +0200 |
| commit | 211f1caa290d83a3e24ad99d53395975a3981014 (patch) | |
| tree | 717e8a9d5debccefacc275fdd28f6a292a5737be /src/libdebug | |
| parent | 1704ebb798bd55a782b80ae6741c5d11403aaf13 (diff) | |
| download | rust-211f1caa290d83a3e24ad99d53395975a3981014.tar.gz rust-211f1caa290d83a3e24ad99d53395975a3981014.zip | |
Deprecate `str::from_utf8_owned`
Use `String::from_utf8` instead [breaking-change]
Diffstat (limited to 'src/libdebug')
| -rw-r--r-- | src/libdebug/repr.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libdebug/repr.rs b/src/libdebug/repr.rs index 3e541929dbf..9755d54a132 100644 --- a/src/libdebug/repr.rs +++ b/src/libdebug/repr.rs @@ -575,7 +575,6 @@ struct P {a: int, b: f64} #[test] fn test_repr() { - use std::str; use std::io::stdio::println; use std::char::is_alphabetic; use std::mem::swap; @@ -584,7 +583,7 @@ fn test_repr() { fn exact_test<T>(t: &T, e:&str) { let mut m = io::MemWriter::new(); write_repr(&mut m as &mut io::Writer, t).unwrap(); - let s = str::from_utf8(m.unwrap().as_slice()).unwrap().to_string(); + let s = String::from_utf8(m.unwrap()).unwrap(); assert_eq!(s.as_slice(), e); } |
