about summary refs log tree commit diff
path: root/src/librustuv/async.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustuv/async.rs')
-rw-r--r--src/librustuv/async.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustuv/async.rs b/src/librustuv/async.rs
index 0c353785982..d9589788c4d 100644
--- a/src/librustuv/async.rs
+++ b/src/librustuv/async.rs
@@ -140,8 +140,9 @@ mod test_remote {
             fn call(&mut self) {
                 // this can get called more than once, but we only want to send
                 // once
-                if self.is_some() {
-                    self.take_unwrap().send(1);
+                let MyCallback(ref mut s) = *self;
+                if s.is_some() {
+                    s.take_unwrap().send(1);
                 }
             }
         }