From d2579f45641b437974829c87d58c2a362ef66919 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 9 Apr 2019 13:11:25 -0400 Subject: core: Rename Behavior to Dispatch (#2082) And rename IsolateState to ThreadSafeState. Also make ThreadSafeState directly implement Dispatch. This is simpler. --- cli/cli_behavior.rs | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 cli/cli_behavior.rs (limited to 'cli/cli_behavior.rs') 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, -} - -impl CliBehavior { - pub fn new(state: Arc) -> Self { - Self { state } - } -} - -impl Behavior for CliBehavior { - fn dispatch( - &mut self, - control: &[u8], - zero_copy: deno_buf, - ) -> (bool, Box) { - ops::dispatch_all(&self.state, control, zero_copy, ops::op_selector_std) - } -} -- cgit v1.2.3