diff options
| author | Kitson Kelly <me@kitsonkelly.com> | 2019-06-20 12:07:01 +1000 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2019-06-19 19:07:01 -0700 |
| commit | 425df50484f315dcd63b4d93ab6911702779899e (patch) | |
| tree | 61d95f3773f254e1ed17d915ad927d40a1caeeea /cli/dispatch_minimal.rs | |
| parent | 43f48386d7921612c5cbe7d39a4dfb82a3f3367e (diff) | |
Combine CLI Errors (#2487)
Diffstat (limited to 'cli/dispatch_minimal.rs')
| -rw-r--r-- | cli/dispatch_minimal.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cli/dispatch_minimal.rs b/cli/dispatch_minimal.rs index e00203576..bda9ea535 100644 --- a/cli/dispatch_minimal.rs +++ b/cli/dispatch_minimal.rs @@ -124,27 +124,27 @@ pub fn dispatch_minimal( } mod ops { - use crate::errors; + use crate::deno_error; use crate::resources; use crate::tokio_write; use deno::PinnedBuf; use futures::Future; - type MinimalOp = dyn Future<Item = i32, Error = errors::DenoError> + Send; + type MinimalOp = dyn Future<Item = i32, Error = deno_error::DenoError> + Send; pub fn read(rid: i32, zero_copy: Option<PinnedBuf>) -> Box<MinimalOp> { debug!("read rid={}", rid); let zero_copy = match zero_copy { None => { - return Box::new(futures::future::err(errors::no_buffer_specified())) + return Box::new(futures::future::err(deno_error::no_buffer_specified())) } Some(buf) => buf, }; match resources::lookup(rid as u32) { - None => Box::new(futures::future::err(errors::bad_resource())), + None => Box::new(futures::future::err(deno_error::bad_resource())), Some(resource) => Box::new( tokio::io::read(resource, zero_copy) - .map_err(errors::DenoError::from) + .map_err(deno_error::DenoError::from) .and_then(move |(_resource, _buf, nread)| Ok(nread as i32)), ), } @@ -154,15 +154,15 @@ mod ops { debug!("write rid={}", rid); let zero_copy = match zero_copy { None => { - return Box::new(futures::future::err(errors::no_buffer_specified())) + return Box::new(futures::future::err(deno_error::no_buffer_specified())) } Some(buf) => buf, }; match resources::lookup(rid as u32) { - None => Box::new(futures::future::err(errors::bad_resource())), + None => Box::new(futures::future::err(deno_error::bad_resource())), Some(resource) => Box::new( tokio_write::write(resource, zero_copy) - .map_err(errors::DenoError::from) + .map_err(deno_error::DenoError::from) .and_then(move |(_resource, _buf, nwritten)| Ok(nwritten as i32)), ), } |
