IMO better borrow_mut() documentation on RefCell

Previous borrow() is enough to make borrow_mut() panic, no need to have borrow_mut() twice. [This](http://is.gd/woKKAW)
This commit is contained in:
gareins 2015-04-26 23:16:49 +02:00
parent bba18fec45
commit de35823d49

View file

@ -417,7 +417,7 @@ impl<T> RefCell<T> {
///
/// let result = thread::spawn(move || {
/// let c = RefCell::new(5);
/// let m = c.borrow_mut();
/// let m = c.borrow();
///
/// let b = c.borrow_mut(); // this causes a panic
/// }).join();