Skip to content

Commit

Permalink
Auto merge of #24849 - gareins:master, r=steveklabnik
Browse files Browse the repository at this point in the history
Previous borrow() is enough to make borrow_mut() panic, no need to have borrow_mut() twice. [This](http://is.gd/woKKAW)
  • Loading branch information
bors committed Apr 27, 2015
2 parents 43a273f + de35823 commit f4ab2b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f4ab2b3

Please sign in to comment.