about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-10-24 13:21:49 -0700
committerPatrick Walton <pcwalton@mimiga.net>2013-10-24 13:21:49 -0700
commit76287ccbb097d9b351657de8f514c5dd7c5955d5 (patch)
tree650ef6fcf05ab3970f2cf610aebc365d9ec8cb4e
parent7075eb36254e673fad1055148ee1a02447371215 (diff)
downloadrust-76287ccbb097d9b351657de8f514c5dd7c5955d5.tar.gz
rust-76287ccbb097d9b351657de8f514c5dd7c5955d5.zip
libextra: Make arc clone inline
-rw-r--r--src/libextra/arc.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libextra/arc.rs b/src/libextra/arc.rs
index 1ce52d1d278..9474431177e 100644
--- a/src/libextra/arc.rs
+++ b/src/libextra/arc.rs
@@ -148,6 +148,7 @@ impl<T:Freeze + Send> Clone for Arc<T> {
     * object. However, one of the `arc` objects can be sent to another task,
     * allowing them to share the underlying data.
     */
+    #[inline]
     fn clone(&self) -> Arc<T> {
         Arc { x: self.x.clone() }
     }
@@ -167,6 +168,7 @@ pub struct MutexArc<T> { priv x: UnsafeArc<MutexArcInner<T>> }
 
 impl<T:Send> Clone for MutexArc<T> {
     /// Duplicate a mutex-protected Arc. See arc::clone for more details.
+    #[inline]
     fn clone(&self) -> MutexArc<T> {
         // NB: Cloning the underlying mutex is not necessary. Its reference
         // count would be exactly the same as the shared state's.
@@ -349,6 +351,7 @@ pub struct RWArc<T> {
 
 impl<T:Freeze + Send> Clone for RWArc<T> {
     /// Duplicate a rwlock-protected Arc. See arc::clone for more details.
+    #[inline]
     fn clone(&self) -> RWArc<T> {
         RWArc { x: self.x.clone() }
     }