summaryrefslogtreecommitdiff
path: root/cli/ops/fs_events.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-02-25 09:14:27 -0500
committerGitHub <noreply@github.com>2020-02-25 09:14:27 -0500
commit91b606aaae23bcb790b55adc5fe70a182a37d564 (patch)
tree16b56a21ffcb3991569eda984fbd14073bdbd3ae /cli/ops/fs_events.rs
parent805992b14a65a6dbfb857dea6d9b657477de043d (diff)
Clean up how we use opIds (#4118)
Diffstat (limited to 'cli/ops/fs_events.rs')
-rw-r--r--cli/ops/fs_events.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/cli/ops/fs_events.rs b/cli/ops/fs_events.rs
index 3b4c9b9e5..21e402344 100644
--- a/cli/ops/fs_events.rs
+++ b/cli/ops/fs_events.rs
@@ -1,7 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use super::dispatch_json::{Deserialize, JsonOp, Value};
use crate::op_error::OpError;
-use crate::ops::json_op;
use crate::state::State;
use deno_core::*;
use futures::future::poll_fn;
@@ -18,14 +17,8 @@ use std::path::PathBuf;
use tokio::sync::mpsc;
pub fn init(i: &mut Isolate, s: &State) {
- i.register_op(
- "fs_events_open",
- s.core_op(json_op(s.stateful_op(op_fs_events_open))),
- );
- i.register_op(
- "fs_events_poll",
- s.core_op(json_op(s.stateful_op(op_fs_events_poll))),
- );
+ i.register_op("op_fs_events_open", s.stateful_json_op(op_fs_events_open));
+ i.register_op("op_fs_events_poll", s.stateful_json_op(op_fs_events_poll));
}
struct FsEventsResource {