use std::cell::RefCell;
use std::rc::Rc;
+use std::strbuf::StrBuf;
#[deriving(Eq, Show)]
struct Point {
assert_eq!(*s, ~"foo");
assert_eq!((*s).as_slice(), "foo");
- let mut_s = Rc::new(RefCell::new(~"foo"));
+ let mut_s = Rc::new(RefCell::new(StrBuf::from_str("foo")));
(*(*mut_s).borrow_mut()).push_str("bar");
// assert_eq! would fail here because it stores the LHS and RHS in two locals.
assert!((*(*mut_s).borrow()).as_slice() == "foobar");