diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-04-23 18:58:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-23 18:58:00 -0400 |
commit | d68b44b6b2fad6c321aa01a039030bb98c5be88d (patch) | |
tree | ece2a6c7d4787a697aa9ba10cbf643d02d713294 /cli/state.rs | |
parent | 675919e915650cd1c88a1cdb4f67310133b8a05e (diff) |
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.
Diffstat (limited to 'cli/state.rs')
-rw-r--r-- | cli/state.rs | 7 |
1 files changed, 3 insertions, 4 deletions
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<Op>) { |