Skip to content

Commit 5783df2

Browse files
committed
refactor(linter): dereference Allocator from AllocatorGuard (#13073)
Tiny refactor. Just to clarify when a var contains an `Allocator`, and when an `AllocatorGuard`.
1 parent 1d77d92 commit 5783df2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/oxc_linter/src/service/runtime.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,9 @@ impl Runtime {
893893
let mut records =
894894
SmallVec::<[Result<ResolvedModuleRecord, Vec<OxcDiagnostic>>; 1]>::new();
895895

896-
let module_content = ModuleContent::try_new(allocator_guard, |allocator| {
896+
let module_content = ModuleContent::try_new(allocator_guard, |allocator_guard| {
897+
let allocator = &**allocator_guard;
898+
897899
let Some(stt) = self.get_source_type_and_text(Path::new(path), ext, allocator)
898900
else {
899901
return Err(());

0 commit comments

Comments
 (0)