diff --git a/src/libextra/arc.rs b/src/libextra/arc.rs index 3aa77577fb2..af69997f02e 100644 --- a/src/libextra/arc.rs +++ b/src/libextra/arc.rs @@ -140,14 +140,14 @@ impl Arc { } } -/** - * Duplicate an atomically reference counted wrapper. - * - * The resulting two `arc` objects will point to the same underlying data - * object. However, one of the `arc` objects can be sent to another task, - * allowing them to share the underlying data. - */ impl Clone for Arc { + /** + * Duplicate an atomically reference counted wrapper. + * + * The resulting two `arc` objects will point to the same underlying data + * object. However, one of the `arc` objects can be sent to another task, + * allowing them to share the underlying data. + */ fn clone(&self) -> Arc { Arc { x: self.x.clone() } } @@ -164,7 +164,7 @@ struct MutexArc { priv x: UnsafeAtomicRcBox> } impl Clone for MutexArc { - /// Duplicate a mutex-protected Arc, as arc::clone. + /// Duplicate a mutex-protected Arc. See arc::clone for more details. fn clone(&self) -> MutexArc { // NB: Cloning the underlying mutex is not necessary. Its reference // count would be exactly the same as the shared state's. @@ -312,12 +312,10 @@ struct RWArc { priv x: UnsafeAtomicRcBox>, } -impl RWArc { - /// Duplicate a rwlock-protected Arc, as arc::clone. - pub fn clone(&self) -> RWArc { - RWArc { - x: self.x.clone(), - } +impl Clone for RWArc { + /// Duplicate a rwlock-protected Arc. See arc::clone for more details. + fn clone(&self) -> RWArc { + RWArc { x: self.x.clone() } } }