From 8d3e8b1c642996719fccf594ea3e36d448adf9f8 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 11 Dec 2018 11:32:53 -0500 Subject: [PATCH] Remove dead code: ASSET_PREFIX --- src/deno_dir.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/deno_dir.rs b/src/deno_dir.rs index 2510fb0563..9b31df6eab 100644 --- a/src/deno_dir.rs +++ b/src/deno_dir.rs @@ -176,9 +176,6 @@ impl DenoDir { module_name: &str, filename: &str, ) -> DenoResult { - if module_name.starts_with(ASSET_PREFIX) { - panic!("Asset resolution should be done in JS, not Rust."); - } let is_module_remote = is_remote(module_name); let use_extension = |ext| { let module_name = format!("{}{}", module_name, ext); @@ -405,8 +402,6 @@ fn source_code_hash(filename: &str, source_code: &str) -> String { out } -const ASSET_PREFIX: &str = "/$asset$/"; - fn is_remote(module_name: &str) -> bool { module_name.starts_with("http://") || module_name.starts_with("https://") }