summaryrefslogtreecommitdiff
path: root/cli/info.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2021-02-17 13:47:18 -0500
committerGitHub <noreply@github.com>2021-02-17 13:47:18 -0500
commitc7dabc99eed50fa20cdcafd7c0175ab615da3d50 (patch)
treeec2c611c627827bbdd61d3e27400ae1b9a50d459 /cli/info.rs
parentf6d6b24506410816833d802e1a8d9cd704f73289 (diff)
Make ModuleSpecifier a type alias, not wrapper struct (#9531)
Diffstat (limited to 'cli/info.rs')
-rw-r--r--cli/info.rs14
1 files changed, 4 insertions, 10 deletions
diff --git a/cli/info.rs b/cli/info.rs
index 1f3a0096a..61daa9341 100644
--- a/cli/info.rs
+++ b/cli/info.rs
@@ -202,6 +202,7 @@ pub fn human_size(size: f64) -> String {
#[cfg(test)]
mod test {
use super::*;
+ use deno_core::resolve_url_or_path;
use deno_core::serde_json::json;
#[test]
@@ -218,12 +219,8 @@ mod test {
}
fn get_fixture() -> ModuleGraphInfo {
- let spec_c =
- ModuleSpecifier::resolve_url_or_path("https://deno.land/x/a/b/c.ts")
- .unwrap();
- let spec_d =
- ModuleSpecifier::resolve_url_or_path("https://deno.land/x/a/b/c.ts")
- .unwrap();
+ let spec_c = resolve_url_or_path("https://deno.land/x/a/b/c.ts").unwrap();
+ let spec_d = resolve_url_or_path("https://deno.land/x/a/b/c.ts").unwrap();
let deps = vec![ModuleInfo {
deps: Vec::new(),
name: spec_d.clone(),
@@ -261,10 +258,7 @@ mod test {
info,
local: PathBuf::from("/a/b/c.ts"),
map: None,
- module: ModuleSpecifier::resolve_url_or_path(
- "https://deno.land/x/a/b/c.ts",
- )
- .unwrap(),
+ module: resolve_url_or_path("https://deno.land/x/a/b/c.ts").unwrap(),
total_size: 999999,
}
}