Skip to content

Commit

Permalink
Remove recommendation about idiomatic syntax for Arc::Clone
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Cameron <nrc@ncameron.org>
  • Loading branch information
nrc committed Aug 4, 2019
1 parent 2c13edc commit 47b16b6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/liballoc/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
/// // a, b, and foo are all Arcs that point to the same memory location
/// ```
///
/// The [`Arc::clone(&from)`] syntax is the most idiomatic because it conveys more explicitly
/// the meaning of the code. In the example above, this syntax makes it easier to see that
/// this code is creating a new reference rather than copying the whole content of foo.
///
/// ## `Deref` behavior
///
/// `Arc<T>` automatically dereferences to `T` (via the [`Deref`][deref] trait),
Expand Down

0 comments on commit 47b16b6

Please sign in to comment.