diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2019-11-17 01:17:47 +0100 |
---|---|---|
committer | Ry Dahl <ry@tinyclouds.org> | 2019-11-16 19:17:47 -0500 |
commit | 8f9a942cb911ed017eb128e9fbeb6f9a48e69601 (patch) | |
tree | 4f56623262f84becac18546d9da3d5d9ce9c8735 /cli/ops/timers.rs | |
parent | cb00fd6e988184420f842b1e77ca4cf627d32773 (diff) |
Use futures 0.3 API (#3358)
Diffstat (limited to 'cli/ops/timers.rs')
-rw-r--r-- | cli/ops/timers.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/ops/timers.rs b/cli/ops/timers.rs index 9d87aaf5c..7223633f8 100644 --- a/cli/ops/timers.rs +++ b/cli/ops/timers.rs @@ -3,7 +3,7 @@ use super::dispatch_json::{Deserialize, JsonOp, Value}; use crate::ops::json_op; use crate::state::ThreadSafeState; use deno::*; -use futures::Future; +use futures::future::FutureExt; use std; use std::time::Duration; use std::time::Instant; @@ -51,7 +51,7 @@ fn op_global_timer( .new_timeout(deadline) .then(move |_| futures::future::ok(json!({}))); - Ok(JsonOp::Async(Box::new(f))) + Ok(JsonOp::Async(f.boxed())) } // Returns a milliseconds and nanoseconds subsec |