diff --git a/cli/cli.rs b/cli/cli.rs index 42b2b29f8a..e5b39c5589 100644 --- a/cli/cli.rs +++ b/cli/cli.rs @@ -14,11 +14,6 @@ use deno_core::StartupData; use std::sync::atomic::Ordering; use std::sync::Arc; -// Buf represents a byte array returned from a "Op". The message might be empty -// (which will be translated into a null object on the javascript side) or it is -// a heap allocated opaque sequence of bytes. Usually a flatbuffer message. -pub type Buf = Box<[u8]>; - /// Implements deno_core::Behavior for the main Deno command-line. pub struct Cli { startup_data: Option, diff --git a/cli/compiler.rs b/cli/compiler.rs index 2d6e4a4b70..ec02b62f84 100644 --- a/cli/compiler.rs +++ b/cli/compiler.rs @@ -1,5 +1,4 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -use crate::cli::Buf; use crate::isolate_state::IsolateState; use crate::msg; use crate::permissions::{DenoPermissions, PermissionAccessor}; @@ -8,6 +7,7 @@ use crate::resources::Resource; use crate::resources::ResourceId; use crate::startup_data; use crate::workers; +use deno_core::Buf; use futures::Future; use serde_json; use std::str; diff --git a/cli/isolate_state.rs b/cli/isolate_state.rs index 4cc0103896..8b7745f9ec 100644 --- a/cli/isolate_state.rs +++ b/cli/isolate_state.rs @@ -1,9 +1,9 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -use crate::cli::Buf; use crate::deno_dir; use crate::flags; use crate::global_timer::GlobalTimer; use crate::modules::Modules; +use deno_core::Buf; use futures::sync::mpsc as async_mpsc; use std; use std::env; diff --git a/cli/ops.rs b/cli/ops.rs index 254a21563b..862f925602 100644 --- a/cli/ops.rs +++ b/cli/ops.rs @@ -1,7 +1,6 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. use atty; use crate::ansi; -use crate::cli::Buf; use crate::cli::Cli; use crate::errors; use crate::errors::{permission_denied, DenoError, DenoResult, ErrorKind}; @@ -21,6 +20,7 @@ use crate::tokio_util; use crate::tokio_write; use crate::version; use deno_core::deno_buf; +use deno_core::Buf; use deno_core::JSError; use deno_core::Op; use flatbuffers::FlatBufferBuilder; diff --git a/cli/resources.rs b/cli/resources.rs index 1540f4ff73..2f07f0f11c 100644 --- a/cli/resources.rs +++ b/cli/resources.rs @@ -8,7 +8,6 @@ // descriptors". This module implements a global resource table. Ops (AKA // handlers) look up resources by their integer id here. -use crate::cli::Buf; use crate::errors; use crate::errors::bad_resource; use crate::errors::DenoError; @@ -17,6 +16,8 @@ use crate::http_body::HttpBody; use crate::isolate_state::WorkerChannels; use crate::repl::Repl; +use deno_core::Buf; + use futures; use futures::Future; use futures::Poll; diff --git a/cli/workers.rs b/cli/workers.rs index edded77564..a69acd6cce 100644 --- a/cli/workers.rs +++ b/cli/workers.rs @@ -1,5 +1,4 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -use crate::cli::Buf; use crate::cli::Cli; use crate::flags::DenoFlags; use crate::isolate::Isolate; @@ -9,6 +8,7 @@ use crate::js_errors::JSErrorColor; use crate::permissions::DenoPermissions; use crate::resources; use crate::tokio_util; +use deno_core::Buf; use deno_core::JSError; use deno_core::StartupData; use futures::future::lazy;