summaryrefslogtreecommitdiff
path: root/cli/cli_behavior.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-04-09 13:11:25 -0400
committerGitHub <noreply@github.com>2019-04-09 13:11:25 -0400
commitd2579f45641b437974829c87d58c2a362ef66919 (patch)
treeb1340c30daade103f6be9db1de6d7d4fad199a9c /cli/cli_behavior.rs
parente43da28b28c8b1ed97da603ec0e6bf91fbb67798 (diff)
core: Rename Behavior to Dispatch (#2082)
And rename IsolateState to ThreadSafeState. Also make ThreadSafeState directly implement Dispatch. This is simpler.
Diffstat (limited to 'cli/cli_behavior.rs')
-rw-r--r--cli/cli_behavior.rs28
1 files changed, 0 insertions, 28 deletions
diff --git a/cli/cli_behavior.rs b/cli/cli_behavior.rs
deleted file mode 100644
index 510b2608c..000000000
--- a/cli/cli_behavior.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
-use crate::isolate_state::*;
-use crate::ops;
-use deno::deno_buf;
-use deno::Behavior;
-use deno::Op;
-use std::sync::Arc;
-
-/// Implements deno::Behavior for the main Deno command-line.
-pub struct CliBehavior {
- pub state: Arc<IsolateState>,
-}
-
-impl CliBehavior {
- pub fn new(state: Arc<IsolateState>) -> Self {
- Self { state }
- }
-}
-
-impl Behavior for CliBehavior {
- fn dispatch(
- &mut self,
- control: &[u8],
- zero_copy: deno_buf,
- ) -> (bool, Box<Op>) {
- ops::dispatch_all(&self.state, control, zero_copy, ops::op_selector_std)
- }
-}