diff options
| author | Colin Sherratt <colin.sherratt@gmail.com> | 2013-12-31 16:14:58 -0500 |
|---|---|---|
| committer | Colin Sherratt <colin.sherratt@gmail.com> | 2013-12-31 16:14:58 -0500 |
| commit | 4f462a05066ea4ddbe65d3033402e7c80247ddde (patch) | |
| tree | cb87ed330251d2dfcaa592b7d9e91becc911a37e | |
| parent | 06a8d59ded67dfaa589112ceb8a8e031bc575249 (diff) | |
| download | rust-4f462a05066ea4ddbe65d3033402e7c80247ddde.tar.gz rust-4f462a05066ea4ddbe65d3033402e7c80247ddde.zip | |
Added Freeze trait to CowArc
| -rw-r--r-- | src/libextra/arc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libextra/arc.rs b/src/libextra/arc.rs index 81b183cc0ed..9cb33d3c65a 100644 --- a/src/libextra/arc.rs +++ b/src/libextra/arc.rs @@ -559,7 +559,7 @@ pub struct CowArc<T> { priv x: UnsafeArc<T> } /// mutation of the contents if there is only a single reference to /// the data. If there are multiple references the data is automatically /// cloned and the task modifies the cloned data in place of the shared data. -impl<T:Clone+Send> CowArc<T> { +impl<T:Clone+Send+Freeze> CowArc<T> { /// Create a copy-on-write atomically reference counted wrapper #[inline] pub fn new(data: T) -> CowArc<T> { @@ -583,7 +583,7 @@ impl<T:Clone+Send> CowArc<T> { } } -impl<T:Clone+Send> Clone for CowArc<T> { +impl<T:Clone+Send+Freeze> Clone for CowArc<T> { /// Duplicate a Copy-on-write Arc. See arc::clone for more details. #[inline] fn clone(&self) -> CowArc<T> { |
