Remove the clone function for the method
This commit is contained in:
parent
f2125434d8
commit
ff28bb7839
@ -123,6 +123,7 @@ fn get<'a>(&'a self) -> &'a T {
|
|||||||
unsafe { &*self.x.get_immut() }
|
unsafe { &*self.x.get_immut() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Duplicate an atomically reference counted wrapper.
|
* Duplicate an atomically reference counted wrapper.
|
||||||
*
|
*
|
||||||
@ -130,13 +131,9 @@ fn get<'a>(&'a self) -> &'a T {
|
|||||||
* object. However, one of the `arc` objects can be sent to another task,
|
* object. However, one of the `arc` objects can be sent to another task,
|
||||||
* allowing them to share the underlying data.
|
* 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> {
|
impl<T:Const + Owned> Clone for ARC<T> {
|
||||||
fn clone(&self) -> ARC<T> {
|
fn clone(&self) -> ARC<T> {
|
||||||
clone(self)
|
ARC { x: self.x.clone() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user