summaryrefslogtreecommitdiff
path: root/cli/ops/timers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/ops/timers.rs')
-rw-r--r--cli/ops/timers.rs4
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