Fix builds.

This commit is contained in:
Stephen Chung 2022-01-01 17:38:32 +08:00
parent 135b1f54c2
commit a6ddb64596
5 changed files with 6 additions and 6 deletions

View File

@ -79,7 +79,7 @@ impl Engine {
name, name,
FnNamespace::Global, FnNamespace::Global,
FnAccess::Public, FnAccess::Public,
param_type_names.as_ref().map(|v| v.as_ref()), param_type_names.as_ref().map(<_>::as_ref),
&param_types, &param_types,
func.into_callable_function(), func.into_callable_function(),
); );
@ -137,7 +137,7 @@ impl Engine {
name, name,
FnNamespace::Global, FnNamespace::Global,
FnAccess::Public, FnAccess::Public,
param_type_names.as_ref().map(|v| v.as_ref()), param_type_names.as_ref().map(<_>::as_ref),
&param_types, &param_types,
func.into_callable_function(), func.into_callable_function(),
); );

View File

@ -156,7 +156,7 @@ impl<'a> NativeCallContext<'a> {
Self { Self {
engine, engine,
fn_name: fn_name.as_ref(), fn_name: fn_name.as_ref(),
source: source.map(S::as_ref), source: source.map(<_>::as_ref),
global: Some(global), global: Some(global),
lib, lib,
pos, pos,

View File

@ -77,7 +77,7 @@ impl ModuleResolversCollection {
/// Get an iterator of all the [module resolvers][ModuleResolver]. /// Get an iterator of all the [module resolvers][ModuleResolver].
#[inline] #[inline]
pub fn iter(&self) -> impl Iterator<Item = &dyn ModuleResolver> { pub fn iter(&self) -> impl Iterator<Item = &dyn ModuleResolver> {
self.0.iter().map(|v| v.as_ref()) self.0.iter().map(<_>::as_ref)
} }
/// Remove all [module resolvers][ModuleResolver]. /// Remove all [module resolvers][ModuleResolver].
#[inline(always)] #[inline(always)]

View File

@ -225,7 +225,7 @@ impl FileModuleResolver {
path: impl AsRef<str>, path: impl AsRef<str>,
source_path: Option<impl AsRef<str>>, source_path: Option<impl AsRef<str>>,
) -> Option<Shared<Module>> { ) -> Option<Shared<Module>> {
let file_path = self.get_file_path(path.as_ref(), source_path.as_ref().map(|v| v.as_ref())); let file_path = self.get_file_path(path.as_ref(), source_path.as_ref().map(<_>::as_ref));
shared_write_lock(&self.cache) shared_write_lock(&self.cache)
.remove_entry(&file_path) .remove_entry(&file_path)

View File

@ -2623,7 +2623,7 @@ fn parse_export(
pos: id_pos, pos: id_pos,
}, },
Ident { Ident {
name: state.get_identifier("", rename.as_ref().map_or("", |s| s.as_ref())), name: state.get_identifier("", rename.as_ref().map_or("", <_>::as_ref)),
pos: rename_pos, pos: rename_pos,
}, },
)); ));