add missing free in transaction test; things are broken

This commit is contained in:
soruh 2023-08-03 02:26:49 +02:00
parent d501962881
commit 97d5a05671
3 changed files with 5 additions and 5 deletions

View File

@ -421,8 +421,6 @@ impl SlabListPointer {
let this = self.read_header(db);
dbg!(&this);
let capacity = this.capacity();
let SlabListHeader { mut next, len, .. } = this;

View File

@ -860,7 +860,9 @@ mod tests {
};
let next = if n >= 5 {
transaction.read(data.list).next
let next = transaction.read(data.list).next;
transaction.free(data.list);
next
} else {
data.list
};

View File

@ -137,8 +137,8 @@ impl<'t, R> TransactionHandle<'t, R> {
}
}
pub fn free<T>(&mut self, at: RawFilePointer) {
self.free_range(at.range(size_of::<T>() as u64))
pub fn free<T>(&mut self, at: FilePointer<T>) {
self.free_range(at.range())
}
pub fn free_range(&mut self, range: FileRange) {