File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5
- refs/heads/try: 7c9daa8ff71cb5896af9bb9a6ec8e15391e76b4e
5
+ refs/heads/try: 18119afbbefccae7d46a981ea11a7e1295fb7867
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
Original file line number Diff line number Diff line change @@ -105,26 +105,26 @@ impl<T> Drop for Rc<T> {
105
105
#[ cfg( test) ]
106
106
mod test_rc {
107
107
use super :: * ;
108
- use cell :: Cell ;
108
+ use mutable :: Mut ;
109
109
110
110
#[ test]
111
111
fn test_clone( ) {
112
- let x = Rc :: from_send ( Cell :: new ( 5 ) ) ;
112
+ let x = Rc :: from_send ( Mut :: new ( 5 ) ) ;
113
113
let y = x. clone ( ) ;
114
- do x. borrow ( ) . with_mut_ref |inner| {
114
+ do x. borrow ( ) . map_mut |inner| {
115
115
* inner = 20 ;
116
116
}
117
- assert_eq ! ( y. borrow( ) . take ( ) , 20 ) ;
117
+ assert_eq ! ( y. borrow( ) . map ( |v| * v ) , 20 ) ;
118
118
}
119
119
120
120
#[ test]
121
121
fn test_deep_clone( ) {
122
- let x = Rc :: from_send ( Cell :: new ( 5 ) ) ;
122
+ let x = Rc :: from_send ( Mut :: new ( 5 ) ) ;
123
123
let y = x. deep_clone ( ) ;
124
- do x. borrow ( ) . with_mut_ref |inner| {
124
+ do x. borrow ( ) . map_mut |inner| {
125
125
* inner = 20 ;
126
126
}
127
- assert_eq ! ( y. borrow( ) . take ( ) , 5 ) ;
127
+ assert_eq ! ( y. borrow( ) . map ( |v| * v ) , 5 ) ;
128
128
}
129
129
130
130
#[ test]
You can’t perform that action at this time.
0 commit comments