Skip to content

Commit f4ab2b3

Browse files
committed
Auto merge of #24849 - gareins:master, r=steveklabnik
Previous borrow() is enough to make borrow_mut() panic, no need to have borrow_mut() twice. [This](http://is.gd/woKKAW)
2 parents 43a273f + de35823 commit f4ab2b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/cell.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ impl<T> RefCell<T> {
417417
///
418418
/// let result = thread::spawn(move || {
419419
/// let c = RefCell::new(5);
420-
/// let m = c.borrow_mut();
420+
/// let m = c.borrow();
421421
///
422422
/// let b = c.borrow_mut(); // this causes a panic
423423
/// }).join();

0 commit comments

Comments
 (0)