diff options
| author | gareins <ozbolt.menegatti@gmail.com> | 2015-04-26 23:16:49 +0200 |
|---|---|---|
| committer | gareins <ozbolt.menegatti@gmail.com> | 2015-04-26 23:16:49 +0200 |
| commit | de35823d49e72b0db8dce1c94edfba77458cda84 (patch) | |
| tree | ed8fcfc7ec4adf6e4991eb548d13eb100090195a /src/libcore | |
| parent | bba18fec45b0764c1c65b8f0d3ea1fb50ad8a57b (diff) | |
| download | rust-de35823d49e72b0db8dce1c94edfba77458cda84.tar.gz rust-de35823d49e72b0db8dce1c94edfba77458cda84.zip | |
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)
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/cell.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index df0de234b9a..b4b25258bbf 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -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(); |
