1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-13 19:18:56 +00:00

fixup! feat(core): introduce new drawing library

This commit is contained in:
cepetr 2024-05-02 11:38:17 +02:00
parent 49865f41cd
commit f7562ac924

View File

@ -144,15 +144,18 @@ impl<'a> ZlibCache<'a> {
.iter_mut()
.find(|slot| slot.is_for(zdata, offset));
if let Some(slot) = slot {
slot.uncompress(dest_buf)
} else {
let selected = self.select_slot_for_reuse()?;
let slot = &mut self.slots[selected];
slot.reset(zdata);
slot.skip(offset)?;
slot.uncompress(dest_buf)
}
let slot = match slot {
Some(slot) => slot,
None => {
let selected = self.select_slot_for_reuse()?;
let slot = &mut self.slots[selected];
slot.reset(zdata);
slot.skip(offset)?;
slot
}
};
slot.uncompress(dest_buf)
}
pub fn uncompress_toif(