diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2014-02-28 00:02:27 +0200 |
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2014-03-13 14:21:45 +0200 |
| commit | cdc18b96d6aa38c22b4fa9715c974ef986ad250d (patch) | |
| tree | 9a0fae0250cb35e67a2f966ed6e17eb0a7afaef1 /src/doc/tutorial.md | |
| parent | 12b2607572d6233a1d4b4f7592573e49b505771e (diff) | |
| download | rust-cdc18b96d6aa38c22b4fa9715c974ef986ad250d.tar.gz rust-cdc18b96d6aa38c22b4fa9715c974ef986ad250d.zip | |
Remove Rc's borrow method to avoid conflicts with RefCell's borrow in Rc<RefCell<T>>.
Diffstat (limited to 'src/doc/tutorial.md')
| -rw-r--r-- | src/doc/tutorial.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/tutorial.md b/src/doc/tutorial.md index 8f37aecfc34..15fd21e9fbc 100644 --- a/src/doc/tutorial.md +++ b/src/doc/tutorial.md @@ -1687,7 +1687,7 @@ let x = Rc::new([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); let y = x.clone(); // a new owner let z = x; // this moves `x` into `z`, rather than creating a new owner -assert!(*z.borrow() == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); +assert!(*z == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); // the variable is mutable, but not the contents of the box let mut a = Rc::new([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]); |
