Skip to content

Commit

Permalink
Remove the clone function for the method
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Saut committed May 24, 2013
1 parent f212543 commit ff28bb7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/libextra/arc.rs
Expand Up @@ -123,20 +123,17 @@ pub impl<T:Const+Owned> ARC<T> {
unsafe { &*self.x.get_immut() }
}
}

/**
* 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.
*/
pub fn clone<T:Const + Owned>(rc: &ARC<T>) -> ARC<T> {
ARC { x: rc.x.clone() }
}

impl<T:Const + Owned> Clone for ARC<T> {
fn clone(&self) -> ARC<T> {
clone(self)
ARC { x: self.x.clone() }
}
}

Expand Down

1 comment on commit ff28bb7

@brson
Copy link

@brson brson commented on ff28bb7 May 25, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

Please sign in to comment.