liballoc: remove unnecessary as_slice() calls

This commit is contained in:
Jorge Aparicio
2014-11-27 13:03:07 -05:00
parent f2af07e6d5
commit 0ac3b166df
2 changed files with 5 additions and 5 deletions

View File

@@ -521,7 +521,7 @@ mod tests {
#[test] #[test]
fn show_arc() { fn show_arc() {
let a = Arc::new(5u32); let a = Arc::new(5u32);
assert!(format!("{}", a).as_slice() == "5") assert!(format!("{}", a) == "5")
} }
// Make sure deriving works with Arc<T> // Make sure deriving works with Arc<T>

View File

@@ -169,14 +169,14 @@ mod test {
let b = box Test as Box<Any>; let b = box Test as Box<Any>;
let a_str = a.to_str(); let a_str = a.to_str();
let b_str = b.to_str(); let b_str = b.to_str();
assert_eq!(a_str.as_slice(), "Box<Any>"); assert_eq!(a_str, "Box<Any>");
assert_eq!(b_str.as_slice(), "Box<Any>"); assert_eq!(b_str, "Box<Any>");
let a = &8u as &Any; let a = &8u as &Any;
let b = &Test as &Any; let b = &Test as &Any;
let s = format!("{}", a); let s = format!("{}", a);
assert_eq!(s.as_slice(), "&Any"); assert_eq!(s, "&Any");
let s = format!("{}", b); let s = format!("{}", b);
assert_eq!(s.as_slice(), "&Any"); assert_eq!(s, "&Any");
} }
} }