Skip to content

Commit ff28bb7

Browse files
author
Olivier Saut
committed
Remove the clone function for the method
1 parent f212543 commit ff28bb7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/libextra/arc.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -123,20 +123,17 @@ pub impl<T:Const+Owned> ARC<T> {
123123
unsafe { &*self.x.get_immut() }
124124
}
125125
}
126+
126127
/**
127128
* Duplicate an atomically reference counted wrapper.
128129
*
129130
* The resulting two `arc` objects will point to the same underlying data
130131
* object. However, one of the `arc` objects can be sent to another task,
131132
* allowing them to share the underlying data.
132133
*/
133-
pub fn clone<T:Const + Owned>(rc: &ARC<T>) -> ARC<T> {
134-
ARC { x: rc.x.clone() }
135-
}
136-
137134
impl<T:Const + Owned> Clone for ARC<T> {
138135
fn clone(&self) -> ARC<T> {
139-
clone(self)
136+
ARC { x: self.x.clone() }
140137
}
141138
}
142139

0 commit comments

Comments
 (0)