1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 07:44:48 -05:00

Remove dead code: ASSET_PREFIX

This commit is contained in:
Ryan Dahl 2018-12-11 11:32:53 -05:00
parent acd9fa2298
commit 8d3e8b1c64

View file

@ -176,9 +176,6 @@ impl DenoDir {
module_name: &str, module_name: &str,
filename: &str, filename: &str,
) -> DenoResult<CodeFetchOutput> { ) -> DenoResult<CodeFetchOutput> {
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 is_module_remote = is_remote(module_name);
let use_extension = |ext| { let use_extension = |ext| {
let module_name = format!("{}{}", module_name, ext); let module_name = format!("{}{}", module_name, ext);
@ -405,8 +402,6 @@ fn source_code_hash(filename: &str, source_code: &str) -> String {
out out
} }
const ASSET_PREFIX: &str = "/$asset$/";
fn is_remote(module_name: &str) -> bool { fn is_remote(module_name: &str) -> bool {
module_name.starts_with("http://") || module_name.starts_with("https://") module_name.starts_with("http://") || module_name.starts_with("https://")
} }