We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f212543 commit ff28bb7Copy full SHA for ff28bb7
src/libextra/arc.rs
@@ -123,20 +123,17 @@ pub impl<T:Const+Owned> ARC<T> {
123
unsafe { &*self.x.get_immut() }
124
}
125
126
+
127
/**
128
* Duplicate an atomically reference counted wrapper.
129
*
130
* The resulting two `arc` objects will point to the same underlying data
131
* object. However, one of the `arc` objects can be sent to another task,
132
* allowing them to share the underlying data.
133
*/
-pub fn clone<T:Const + Owned>(rc: &ARC<T>) -> ARC<T> {
134
- ARC { x: rc.x.clone() }
135
-}
136
-
137
impl<T:Const + Owned> Clone for ARC<T> {
138
fn clone(&self) -> ARC<T> {
139
- clone(self)
+ ARC { x: self.x.clone() }
140
141
142
0 commit comments