Skip to content

Commit 9252370

Browse files
lilyballthestinger
authored andcommitted
---
yaml --- r: 65014 b: refs/heads/snap-stage3 c: 75155cd h: refs/heads/master v: v3
1 parent bcdc498 commit 9252370

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 1992765dd3b689fa62764eba99ed0610654b070f
4+
refs/heads/snap-stage3: 75155cd1b0c134056e86addbbf9097a26fe6a1f5
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libextra/arc.rs

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ impl<T:Freeze+Send> Arc<T> {
140140
}
141141
}
142142

143-
/**
144-
* Duplicate an atomically reference counted wrapper.
145-
*
146-
* The resulting two `arc` objects will point to the same underlying data
147-
* object. However, one of the `arc` objects can be sent to another task,
148-
* allowing them to share the underlying data.
149-
*/
150143
impl<T:Freeze + Send> Clone for Arc<T> {
144+
/**
145+
* Duplicate an atomically reference counted wrapper.
146+
*
147+
* The resulting two `arc` objects will point to the same underlying data
148+
* object. However, one of the `arc` objects can be sent to another task,
149+
* allowing them to share the underlying data.
150+
*/
151151
fn clone(&self) -> Arc<T> {
152152
Arc { x: self.x.clone() }
153153
}
@@ -164,7 +164,7 @@ struct MutexArc<T> { priv x: UnsafeAtomicRcBox<MutexArcInner<T>> }
164164

165165

166166
impl<T:Send> Clone for MutexArc<T> {
167-
/// Duplicate a mutex-protected Arc, as arc::clone.
167+
/// Duplicate a mutex-protected Arc. See arc::clone for more details.
168168
fn clone(&self) -> MutexArc<T> {
169169
// NB: Cloning the underlying mutex is not necessary. Its reference
170170
// count would be exactly the same as the shared state's.
@@ -312,12 +312,10 @@ struct RWArc<T> {
312312
priv x: UnsafeAtomicRcBox<RWArcInner<T>>,
313313
}
314314
315-
impl<T:Freeze + Send> RWArc<T> {
316-
/// Duplicate a rwlock-protected Arc, as arc::clone.
317-
pub fn clone(&self) -> RWArc<T> {
318-
RWArc {
319-
x: self.x.clone(),
320-
}
315+
impl<T:Freeze + Send> Clone for RWArc<T> {
316+
/// Duplicate a rwlock-protected Arc. See arc::clone for more details.
317+
fn clone(&self) -> RWArc<T> {
318+
RWArc { x: self.x.clone() }
321319
}
322320
323321
}

0 commit comments

Comments
 (0)