diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-03-19 16:45:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-19 16:45:39 -0400 |
commit | fb2c0c29ec79434a2ca8354efe8b5e2de8a92558 (patch) | |
tree | e3c8b3c0e9873a1ce1ab76d7e7db1039338b41ed /cli/http_util.rs | |
parent | 5e4312de4d82ae3a41a0f5142eb75b8d804f8897 (diff) |
Add fetch_remote_source_async (#1972)
Diffstat (limited to 'cli/http_util.rs')
-rw-r--r-- | cli/http_util.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cli/http_util.rs b/cli/http_util.rs index 52be9d1bc..9c92c08eb 100644 --- a/cli/http_util.rs +++ b/cli/http_util.rs @@ -1,8 +1,6 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. use crate::errors; use crate::errors::DenoError; -use crate::errors::DenoResult; -use crate::tokio_util; use futures::future::{loop_fn, Loop}; use futures::{future, Future, Stream}; use hyper; @@ -53,6 +51,11 @@ fn resolve_uri_from_location(base_uri: &Uri, location: &str) -> Uri { } } +#[cfg(test)] +use crate::errors::DenoResult; +#[cfg(test)] +use crate::tokio_util; +#[cfg(test)] /// Synchronously fetchs the given HTTP URL. Returns (content, media_type). pub fn fetch_sync_string(module_name: &str) -> DenoResult<(String, String)> { tokio_util::block_on(fetch_string(module_name)) |