You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/lessons/02_ownership/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
+++
2
2
title = "Ownership Model"
3
-
date = 2022-10-17
3
+
date = 2024-10-08
4
4
weight = 1
5
5
[extra]
6
6
lesson_date = 2024-10-10
@@ -141,7 +141,7 @@ fn main() {
141
141
142
142
## Let's borrow some books
143
143
144
-
We now know how to move things around and how to clone them if moving is not possible. But what if making a copy is unnecessary - maybe we just want to let someone look at our resource and keep on holding onto it once their done. Consider the following example:
144
+
We now know how to move things around and how to clone them if moving is not possible. But what if making a copy is unnecessary - maybe we just want to let someone look at our resource and keep on holding onto it once they're done. Consider the following example:
Copy file name to clipboardExpand all lines: content/lessons/07_smart_pointers/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ Rust also provides a non-owning pointer in the form of `Weak<T>` (equivalent to
50
50
51
51
# Mutating the immutable
52
52
53
-
Good examples and explanation of the inferior mutability pattern and runtime borrow checking can be found in the [book](https://doc.rust-lang.org/book/ch15-05-interior-mutability.html).
53
+
Good examples and explanation of the interior mutability pattern and runtime borrow checking can be found in the [book](https://doc.rust-lang.org/book/ch15-05-interior-mutability.html).
54
54
55
55
Alongisde the `RefCell<T>` type described above, there is an analogous [`Cell<T>`](https://doc.rust-lang.org/std/cell/struct.Cell.html) type that operates on values instead of references.
0 commit comments