From d68b44b6b2fad6c321aa01a039030bb98c5be88d Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 23 Apr 2019 18:58:00 -0400 Subject: core: make Isolate concrete, remove Dispatch trait (#2183) Op dispatch is now dynamically dispatched, so slightly less efficient. The immeasurable perf hit is a reasonable trade for the API simplicity that is gained here. --- cli/state.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'cli/state.rs') diff --git a/cli/state.rs b/cli/state.rs index 808678b21..f10f3b7e0 100644 --- a/cli/state.rs +++ b/cli/state.rs @@ -10,7 +10,6 @@ use crate::resources::ResourceId; use crate::worker::Worker; use deno::deno_buf; use deno::Buf; -use deno::Dispatch; use deno::Op; use futures::future::Shared; use std; @@ -74,9 +73,9 @@ impl Deref for ThreadSafeState { } } -impl Dispatch for ThreadSafeState { - fn dispatch( - &mut self, +impl ThreadSafeState { + pub fn dispatch( + &self, control: &[u8], zero_copy: deno_buf, ) -> (bool, Box) { -- cgit v1.2.3