summaryrefslogtreecommitdiffstats
path: root/tokio-test/src
diff options
context:
space:
mode:
Diffstat (limited to 'tokio-test/src')
-rw-r--r--tokio-test/src/clock.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/tokio-test/src/clock.rs b/tokio-test/src/clock.rs
index 942d9b6f..43f073d9 100644
--- a/tokio-test/src/clock.rs
+++ b/tokio-test/src/clock.rs
@@ -134,11 +134,10 @@ impl MockClock {
let handle = timer.handle();
let time = self.time.clone();
- ::tokio_timer::with_default(&handle, || {
- let mut handle = Handle::new(timer, time);
- f(&mut handle)
- // lazy(|| Ok::<_, ()>(f(&mut handle))).wait().unwrap()
- })
+ let _timer = ::tokio_timer::set_default(&handle);
+ let mut handle = Handle::new(timer, time);
+ f(&mut handle)
+ // lazy(|| Ok::<_, ()>(f(&mut handle))).wait().unwrap()
})
}
}