summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-09-01 13:55:40 -0400
committerGitHub <noreply@github.com>2020-09-01 13:55:40 -0400
commitfee6f793302394f87ea2958088d14c44b66edae1 (patch)
tree4042ed74ed111c9311dbb55d808866f5662be3af
parent87e513ffc5d9c14ac4af6a893b9e862c55108bea (diff)
Remove unused crate_modules feature (#7311)
-rw-r--r--core/lib.rs2
-rw-r--r--core/modules.rs20
-rw-r--r--op_crates/web/lib.rs5
3 files changed, 1 insertions, 26 deletions
diff --git a/core/lib.rs b/core/lib.rs
index 413400668..d4a348f63 100644
--- a/core/lib.rs
+++ b/core/lib.rs
@@ -64,5 +64,3 @@ pub fn v8_version() -> &'static str {
fn test_v8_version() {
assert!(v8_version().len() > 3);
}
-
-crate_modules!();
diff --git a/core/modules.rs b/core/modules.rs
index 7ff9634d4..516440bc0 100644
--- a/core/modules.rs
+++ b/core/modules.rs
@@ -516,26 +516,6 @@ impl fmt::Display for Deps {
}
}
-#[macro_export]
-macro_rules! crate_modules {
- () => {
- pub const DENO_CRATE_PATH: &'static str = env!("CARGO_MANIFEST_DIR");
- };
-}
-
-#[macro_export]
-macro_rules! include_crate_modules {
- ( $( $x:ident ),* ) => {
- {
- let mut temp: HashMap<String, String> = HashMap::new();
- $(
- temp.insert(stringify!($x).to_string(), $x::DENO_CRATE_PATH.to_string());
- )*
- temp
- }
- };
-}
-
#[cfg(test)]
mod tests {
use super::*;
diff --git a/op_crates/web/lib.rs b/op_crates/web/lib.rs
index 03c0c89af..3d7b75125 100644
--- a/op_crates/web/lib.rs
+++ b/op_crates/web/lib.rs
@@ -1,10 +1,7 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-use deno_core::crate_modules;
use std::path::PathBuf;
-crate_modules!();
-
pub struct WebScripts {
pub abort_signal: String,
pub declaration: String,
@@ -14,7 +11,7 @@ pub struct WebScripts {
}
fn get_str_path(file_name: &str) -> String {
- PathBuf::from(DENO_CRATE_PATH)
+ PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join(file_name)
.to_string_lossy()
.to_string()