luaur_analysis/methods/
weird_iter_weird_iter_unifier.rs1use crate::records::txn_log::TxnLog;
2use crate::records::type_pack::TypePack;
3use crate::records::weird_iter::WeirdIter;
4use crate::type_aliases::type_pack_id::TypePackId;
5
6impl WeirdIter {
7 pub fn weird_iter_type_pack_id_txn_log(&mut self, mut pack_id: TypePackId, log: &mut TxnLog) {
8 self.pack_id = pack_id;
9 self.log = log as *mut TxnLog;
10 self.pack = log.txn_log_get_mutable::<TypePack, TypePackId>(pack_id);
11 self.index = 0;
12 self.growing = false;
13 while !self.pack.is_null()
14 && unsafe { (*self.pack).head.is_empty() }
15 && unsafe { (*self.pack).tail.is_some() }
16 {
17 pack_id = unsafe { (*self.pack).tail.unwrap() };
18 self.pack = log.txn_log_get_mutable::<TypePack, TypePackId>(pack_id);
19 }
20 }
21}