Skip to content

Commit 360cfce

Browse files
committed
fix: suggestions from code review
1 parent 1c9026f commit 360cfce

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

libs/@local/hashql/compiletest/src/suite/mir_reify.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::{
88
use error_stack::ReportSink;
99
use hashql_ast::node::expr::Expr;
1010
use hashql_core::{
11-
heap::{Heap, Scratch},
11+
heap::{Heap, ResetAllocator, Scratch},
1212
id::IdVec,
1313
module::ModuleRegistry,
1414
pretty::Formatter,
@@ -33,7 +33,7 @@ pub(crate) fn mir_reify<'heap>(
3333
environment: &mut Environment<'heap>,
3434
diagnostics: &mut Vec<SuiteDiagnostic>,
3535
) -> Result<(DefId, DefIdVec<Body<'heap>>, Scratch), SuiteDiagnostic> {
36-
let scratch = Scratch::new();
36+
let mut scratch = Scratch::new();
3737
let registry = ModuleRegistry::new(environment);
3838
let hir_interner = hashql_hir::intern::Interner::new(heap);
3939
let mut hir_context = HirContext::new(&hir_interner, &registry);
@@ -71,6 +71,7 @@ pub(crate) fn mir_reify<'heap>(
7171
},
7272
),
7373
)?;
74+
scratch.reset();
7475

7576
Ok((root, bodies, scratch))
7677
}

0 commit comments

Comments
 (0)