use crate::records::pending_type_pack::PendingTypePack;
use crate::records::txn_log::TxnLog;
use crate::type_aliases::type_pack_id::TypePackId;
impl TxnLog {
pub fn pending_type_pack_id(&self, tp: TypePackId) -> *mut PendingTypePack {
let mut current: *const TxnLog = self;
while !current.is_null() {
let cur = unsafe { &*current };
if let Some(it) = cur.type_pack_changes.find(&tp) {
return it.as_ref() as *const PendingTypePack as *mut PendingTypePack;
}
current = cur.parent;
}
core::ptr::null_mut()
}
}