Implement Garbage Collection

This commit is contained in:
Yuriy Dupyn 2024-02-05 01:34:16 +01:00
parent 1086b2fc5e
commit f3fc67cbbc
4 changed files with 43 additions and 20 deletions

View file

@ -49,10 +49,12 @@ impl <T>EntryDetailed<T> {
Ok(EntryDetailed { header, file_position, data })
}
pub fn forget(self) -> Entry<T> {
pub fn forget(&self) -> Entry<T>
where T: Clone
{
Entry {
header: self.header.into(),
data: self.data,
header: self.header.clone().into(),
data: self.data.clone(),
}
}
}