Skip to content

Commit

Permalink
refactor: Cleanup core/modules.rs (denoland#13149)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomieju committed Dec 21, 2021
1 parent 907cef5 commit aca41a4
Show file tree
Hide file tree
Showing 3 changed files with 178 additions and 202 deletions.
3 changes: 0 additions & 3 deletions cli/module_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use crate::proc_state::ProcState;
use deno_core::error::AnyError;
use deno_core::futures::future::FutureExt;
use deno_core::futures::Future;
use deno_core::ModuleLoadId;
use deno_core::ModuleLoader;
use deno_core::ModuleSpecifier;
use deno_core::OpState;
Expand Down Expand Up @@ -84,7 +83,6 @@ impl ModuleLoader for CliModuleLoader {
fn prepare_load(
&self,
op_state: Rc<RefCell<OpState>>,
_load_id: ModuleLoadId,
specifier: &ModuleSpecifier,
_maybe_referrer: Option<String>,
is_dynamic: bool,
Expand All @@ -108,7 +106,6 @@ impl ModuleLoader for CliModuleLoader {
};
drop(state);

// TODO(bartlomieju): `prepare_module_load` should take `load_id` param
async move {
ps.prepare_module_load(
vec![specifier],
Expand Down
8 changes: 2 additions & 6 deletions core/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,11 @@ pub use crate::module_specifier::ModuleSpecifier;
pub use crate::module_specifier::DUMMY_SPECIFIER;
pub use crate::modules::FsModuleLoader;
pub use crate::modules::ModuleId;
pub use crate::modules::ModuleLoadId;
pub use crate::modules::ModuleLoader;
pub use crate::modules::ModuleSource;
pub use crate::modules::ModuleSourceFuture;
pub use crate::modules::ModuleType;
pub use crate::modules::NoopModuleLoader;
pub use crate::runtime::CompiledWasmModuleStore;
pub use crate::runtime::SharedArrayBufferStore;
// TODO(bartlomieju): this struct should be implementation
// detail nad not be public
pub use crate::modules::RecursiveModuleLoad;
pub use crate::normalize_path::normalize_path;
pub use crate::ops::serialize_op_result;
pub use crate::ops::Op;
Expand All @@ -91,10 +85,12 @@ pub use crate::resources::AsyncResult;
pub use crate::resources::Resource;
pub use crate::resources::ResourceId;
pub use crate::resources::ResourceTable;
pub use crate::runtime::CompiledWasmModuleStore;
pub use crate::runtime::GetErrorClassFn;
pub use crate::runtime::JsErrorCreateFn;
pub use crate::runtime::JsRuntime;
pub use crate::runtime::RuntimeOptions;
pub use crate::runtime::SharedArrayBufferStore;
pub use crate::runtime::Snapshot;
// pub use crate::runtime_modules::include_js_files!;
pub use crate::extensions::Extension;
Expand Down
Loading

0 comments on commit aca41a4

Please sign in to comment.