about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2013-11-14 23:25:00 -0800
committerSteven Fackler <sfackler@gmail.com>2013-11-22 21:19:53 -0800
commit18119afbbefccae7d46a981ea11a7e1295fb7867 (patch)
tree603cdb959f3e8f543f9574bb636f93ec0bb2a906 /src/libstd
parent7c9daa8ff71cb5896af9bb9a6ec8e15391e76b4e (diff)
downloadrust-18119afbbefccae7d46a981ea11a7e1295fb7867.tar.gz
rust-18119afbbefccae7d46a981ea11a7e1295fb7867.zip
Move Rc tests away from Cell
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/rc.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/rc.rs b/src/libstd/rc.rs
index c4ee2190ad8..2ffdf91ba2f 100644
--- a/src/libstd/rc.rs
+++ b/src/libstd/rc.rs
@@ -105,26 +105,26 @@ impl<T> Drop for Rc<T> {
 #[cfg(test)]
 mod test_rc {
     use super::*;
-    use cell::Cell;
+    use mutable::Mut;
 
     #[test]
     fn test_clone() {
-        let x = Rc::from_send(Cell::new(5));
+        let x = Rc::from_send(Mut::new(5));
         let y = x.clone();
-        do x.borrow().with_mut_ref |inner| {
+        do x.borrow().map_mut |inner| {
             *inner = 20;
         }
-        assert_eq!(y.borrow().take(), 20);
+        assert_eq!(y.borrow().map(|v| *v), 20);
     }
 
     #[test]
     fn test_deep_clone() {
-        let x = Rc::from_send(Cell::new(5));
+        let x = Rc::from_send(Mut::new(5));
         let y = x.deep_clone();
-        do x.borrow().with_mut_ref |inner| {
+        do x.borrow().map_mut |inner| {
             *inner = 20;
         }
-        assert_eq!(y.borrow().take(), 5);
+        assert_eq!(y.borrow().map(|v| *v), 5);
     }
 
     #[test]