diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-05-19 23:19:56 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-05-22 14:42:02 -0700 |
| commit | e878721d70349e2055f0ef854085de92e9498fde (patch) | |
| tree | 35940d52f145bca81dcf73e5e7da7f3847ceb413 /src/libserialize | |
| parent | 5633d4641f7d63805e3c12c899f8401410bd825f (diff) | |
| download | rust-e878721d70349e2055f0ef854085de92e9498fde.tar.gz rust-e878721d70349e2055f0ef854085de92e9498fde.zip | |
libcore: Remove all uses of `~str` from `libcore`.
[breaking-change]
Diffstat (limited to 'src/libserialize')
| -rw-r--r-- | src/libserialize/hex.rs | 12 | ||||
| -rw-r--r-- | src/libserialize/json.rs | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/libserialize/hex.rs b/src/libserialize/hex.rs index 3b8500753cb..82ab5fd5b04 100644 --- a/src/libserialize/hex.rs +++ b/src/libserialize/hex.rs @@ -182,8 +182,16 @@ mod tests { #[test] pub fn test_from_hex_all_bytes() { for i in range(0, 256) { - assert_eq!(format!("{:02x}", i as uint).from_hex().unwrap().as_slice(), &[i as u8]); - assert_eq!(format!("{:02X}", i as uint).from_hex().unwrap().as_slice(), &[i as u8]); + assert_eq!(format!("{:02x}", i as uint).as_slice() + .from_hex() + .unwrap() + .as_slice(), + &[i as u8]); + assert_eq!(format!("{:02X}", i as uint).as_slice() + .from_hex() + .unwrap() + .as_slice(), + &[i as u8]); } } diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs index e6f46ea7159..92e3d5a2688 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -2483,7 +2483,7 @@ mod tests { // We can't compare the strings directly because the object fields be // printed in a different order. - assert_eq!(a.clone(), from_str(a.to_str()).unwrap()); + assert_eq!(a.clone(), from_str(a.to_str().as_slice()).unwrap()); assert_eq!(a.clone(), from_str(a.to_pretty_str().as_slice()).unwrap()); } |
