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

@@ -77,7 +77,7 @@ impl ModuleResolversCollection {
/// Get an iterator of all the [module resolvers][ModuleResolver].
#[inline]
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].
#[inline(always)]

View File

@@ -225,7 +225,7 @@ impl FileModuleResolver {
path: impl AsRef<str>,
source_path: Option<impl AsRef<str>>,
) -> 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)
.remove_entry(&file_path)