Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f9d4bdb

Browse files
fix Combine RefCell and Rc title
1 parent 019fbea commit f9d4bdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ fn main() {
186186
However, Rust's borrowing rules don’t allow more than one mutable reference at a time, which can be limiting in certain scenarios. For example, what if you need multiple parts of your program to mutate the same data simultaneously, without violating Rust’s safety? This is where the combination of `Rc<T>` and `RefCell<T>` comes into play, allowing shared ownership *and* mutation.
187187

188188

189-
### Combining <RefCell> and <Rc> we can have multiple owners of mutable data. (single-threaded)
189+
### Combining RefCell and Rc we can have multiple owners of mutable data. (single-threaded)
190190

191191

192192
A common way to use `RefCell<T>` is in combination with `Rc<T>`. Recall that `Rc<T>` lets you have multiple owners of some data, but it only gives immutable access to that data by default. If you have an `Rc<T>` that holds a `RefCell<T>`, you can get a value that can have multiple owners *and* that you can mutate! [3]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /