1
Fork 0

Add clearer wording to Arc clone example code

This commit is contained in:
Otto Rask 2018-08-31 11:21:01 +03:00
parent 6020219993
commit bf7e324e4e

View file

@ -108,7 +108,7 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
/// // The two syntaxes below are equivalent.
/// let a = foo.clone();
/// let b = Arc::clone(&foo);
/// // a and b both point to the same memory location as foo
/// // 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