rust RefCell<T> and Rc<T>

Viewed 50

I have read code that write of this type :

RefCell::new(Rc::new("tmp".to_string()))

and another type of

Rc::new(RefCell::new("tmp".to_string()))

So what are the difference between them?

0 Answers
Related