Skip to content

Commit 26b5e5e

Browse files
nickysnalehander92
authored andcommitted
feat: support TraceLowLevelEvent::DropVariables in write_trace()
1 parent 7679233 commit 26b5e5e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

runtime_tracing/src/capnptrace.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,13 @@ pub fn write_trace(q: &[crate::TraceLowLevelEvent], output: &mut impl std::io::W
412412
TraceLowLevelEvent::DropLastStep => {
413413
event.set_drop_last_step(());
414414
}
415-
TraceLowLevelEvent::DropVariables(vars) => todo!(),
415+
TraceLowLevelEvent::DropVariables(vars) => {
416+
let mut ret_vars = event.init_drop_variables(vars.len().try_into().unwrap());
417+
for i in 0..vars.len() {
418+
let mut q = ret_vars.reborrow().get(i.try_into().unwrap());
419+
q.set_i(vars[i].0.try_into().unwrap());
420+
}
421+
}
416422
TraceLowLevelEvent::CompoundValue(cvr) => todo!(),
417423
TraceLowLevelEvent::CellValue(cvr) => todo!(),
418424
TraceLowLevelEvent::AssignCompoundItem(aci) => todo!(),

0 commit comments

Comments
 (0)