From e199aee30d02627aa1e64cdea1c67dc8fd32b447 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Thu, 6 Jul 2023 15:03:06 +0200 Subject: [PATCH] Rephrase awkward sentence in rc.md (#906) --- src/std/rc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/std/rc.md b/src/std/rc.md index 5ea51da6..f0d91209 100644 --- a/src/std/rc.md +++ b/src/std/rc.md @@ -29,7 +29,7 @@ fn main() {
* `Rc`'s count ensures that its contained value is valid for as long as there are references. -* Like C++'s `std::shared_ptr`. +* `Rc` in Rust is like `std::shared_ptr` in C++. * `Rc::clone` is cheap: it creates a pointer to the same allocation and increases the reference count. Does not make a deep clone and can generally be ignored when looking for performance issues in code. * `make_mut` actually clones the inner value if necessary ("clone-on-write") and returns a mutable reference. * Use `Rc::strong_count` to check the reference count.