Skip to content

Commit

Permalink
Merge pull request #1347 from romanlevin/patch-1
Browse files Browse the repository at this point in the history
Gramatical fix in std/rc.md
  • Loading branch information
marioidival authored May 16, 2020
2 parents 87b589c + 0734882 commit 30fa1f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/std/rc.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ When multiple ownership is needed, `Rc`(Reference Counting) can be used. `Rc` ke

Reference count of an `Rc` increases by 1 whenever an `Rc` is cloned, and decreases by 1 whenever one cloned `Rc` is dropped out of the scope. When an `Rc`'s reference count becomes zero, which means there are no owners remained, both the `Rc` and the value are all dropped.

Cloning an `Rc` never do a deep copy. Cloning creates just another pointer to the wrapped value, and increments the count.
Cloning an `Rc` never performs a deep copy. Cloning creates just another pointer to the wrapped value, and increments the count.

```rust,editable
use std::rc::Rc;
Expand Down

0 comments on commit 30fa1f6

Please sign in to comment.