summaryrefslogtreecommitdiff
path: root/cli/ops/repl.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/repl.rs
parent805992b14a65a6dbfb857dea6d9b657477de043d (diff)
Clean up how we use opIds (#4118)
Diffstat (limited to 'cli/ops/repl.rs')
-rw-r--r--cli/ops/repl.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/cli/ops/repl.rs b/cli/ops/repl.rs
index abd88b973..3645cb902 100644
--- a/cli/ops/repl.rs
+++ b/cli/ops/repl.rs
@@ -1,7 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use super::dispatch_json::{blocking_json, Deserialize, JsonOp, Value};
use crate::op_error::OpError;
-use crate::ops::json_op;
use crate::repl;
use crate::repl::Repl;
use crate::state::State;
@@ -10,14 +9,8 @@ use std::sync::Arc;
use std::sync::Mutex;
pub fn init(i: &mut Isolate, s: &State) {
- i.register_op(
- "repl_start",
- s.core_op(json_op(s.stateful_op(op_repl_start))),
- );
- i.register_op(
- "repl_readline",
- s.core_op(json_op(s.stateful_op(op_repl_readline))),
- );
+ i.register_op("op_repl_start", s.stateful_json_op(op_repl_start));
+ i.register_op("op_repl_readline", s.stateful_json_op(op_repl_readline));
}
struct ReplResource(Arc<Mutex<Repl>>);