Skip to content

Commit 8f6a7ad

Browse files
committed
Update tests
1 parent 718c250 commit 8f6a7ad

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎tests/unit/out/refcount/constructor.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ impl S {
2121
}));
2222
let this: Ptr<S> = __this.as_pointer();
2323
({ SImpl::mut_method(&this) });
24-
(*total_0.with(Value::clone).borrow_mut()) += ({ SImpl::const_method(&this) });
24+
total_0.with(|rc| *rc.borrow_mut() += ({ SImpl::const_method(&this) }));
2525
Rc::try_unwrap(__this).ok().unwrap().into_inner()
2626
}
2727
}
@@ -118,9 +118,9 @@ fn main_0() -> i32 {
118118
let s: Value<S> = Rc::new(RefCell::new(S::S({ 3 })));
119119
let _dtor_s = ScopedDestructor::new(&s, |__p| __p.destructor());
120120
assert!(((*(*s.borrow()).v.borrow()) == 4));
121-
assert!((total_0.with(|rc| rc.borrow().clone()) == 8));
121+
assert!((total_0.with(|rc| *rc.borrow()) == 8));
122122
}
123-
assert!((total_0.with(|rc| rc.borrow().clone()) == 18));
123+
assert!((total_0.with(|rc| *rc.borrow()) == 18));
124124
let p: Value<Point> = Rc::new(RefCell::new(Point::Point3()));
125125
assert!(((*(*p.borrow()).x.borrow()) == 104));
126126
assert!(((*(*p.borrow()).y.borrow()) == 50));
@@ -143,7 +143,7 @@ impl SImpl for Ptr<S> {
143143
}
144144
fn destructor(&self) {
145145
({ SImpl::mut_method(self) });
146-
(*total_0.with(Value::clone).borrow_mut()) += ({ SImpl::const_method(self) });
146+
total_0.with(|rc| *rc.borrow_mut() += ({ SImpl::const_method(self) }));
147147
}
148148
}
149149
pub fn __cpp2rust_init_globals() {

0 commit comments

Comments
 (0)