1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 23:34:47 -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,
filename: &str,
) -> 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 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://")
}