diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-05-07 18:46:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-07 18:46:35 +0200 |
commit | bcd875030a2774a74051ef006c4a66436d43b3fa (patch) | |
tree | 3c42b3d72d61e26e52dab0f1f53d6f8875a49f33 /core/bindings.rs | |
parent | ff49bd9e32a30468d682e503f4c47976934ede29 (diff) |
refactor(core): add AssertedModuleType enum (#14501)
Co-authored-by: Luca Casonato <hello@lcas.dev>
Diffstat (limited to 'core/bindings.rs')
-rw-r--r-- | core/bindings.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/bindings.rs b/core/bindings.rs index 1816cdefb..9d376fc0e 100644 --- a/core/bindings.rs +++ b/core/bindings.rs @@ -2,7 +2,7 @@ use crate::error::is_instance_of_error; use crate::error::JsError; -use crate::modules::get_module_type_from_assertions; +use crate::modules::get_asserted_module_type_from_assertions; use crate::modules::parse_import_assertions; use crate::modules::validate_import_assertions; use crate::modules::ImportAssertionsKind; @@ -343,7 +343,8 @@ pub extern "C" fn host_import_module_dynamically_callback( resolver.reject(tc_scope, e); } } - let module_type = get_module_type_from_assertions(&assertions); + let asserted_module_type = + get_asserted_module_type_from_assertions(&assertions); let resolver_handle = v8::Global::new(scope, resolver); { @@ -358,7 +359,7 @@ pub extern "C" fn host_import_module_dynamically_callback( module_map_rc, &specifier_str, &referrer_name_str, - module_type, + asserted_module_type, resolver_handle, ); state_rc.borrow_mut().notify_new_dynamic_import(); |