diff options
| author | Ben Blum <bblum@andrew.cmu.edu> | 2013-07-23 17:17:34 -0400 |
|---|---|---|
| committer | Ben Blum <bblum@andrew.cmu.edu> | 2013-07-30 13:19:26 -0400 |
| commit | 6b75e92afe174696bd00eaa8283ad9e3b1d01582 (patch) | |
| tree | 0a4a209775847357108e2a29430f17502da85a98 /src/libextra/arc.rs | |
| parent | fa8102ab4afc4deba80344f4a2fdb5861cbe394f (diff) | |
| download | rust-6b75e92afe174696bd00eaa8283ad9e3b1d01582.tar.gz rust-6b75e92afe174696bd00eaa8283ad9e3b1d01582.zip | |
UnsafeArc methods return unsafe pointers, so are not themselves unsafe.
Diffstat (limited to 'src/libextra/arc.rs')
| -rw-r--r-- | src/libextra/arc.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libextra/arc.rs b/src/libextra/arc.rs index 9479e47ed8c..d4bf1d480ed 100644 --- a/src/libextra/arc.rs +++ b/src/libextra/arc.rs @@ -136,7 +136,7 @@ impl<T:Freeze+Send> Arc<T> { */ pub fn unwrap(self) -> T { let Arc { x: x } = self; - unsafe { x.unwrap() } + x.unwrap() } } @@ -250,7 +250,7 @@ impl<T:Send> MutexArc<T> { */ pub fn unwrap(self) -> T { let MutexArc { x: x } = self; - let inner = unsafe { x.unwrap() }; + let inner = x.unwrap(); let MutexArcInner { failed: failed, data: data, _ } = inner; if failed { fail!(~"Can't unwrap poisoned MutexArc - another task failed inside!"); @@ -469,7 +469,7 @@ impl<T:Freeze + Send> RWArc<T> { */ pub fn unwrap(self) -> T { let RWArc { x: x, _ } = self; - let inner = unsafe { x.unwrap() }; + let inner = x.unwrap(); let RWArcInner { failed: failed, data: data, _ } = inner; if failed { fail!(~"Can't unwrap poisoned RWArc - another task failed inside!") |
