1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-07-03 13:22:33 +00:00

fixup! feat(core): introduce new drawing library

This commit is contained in:
cepetr 2024-05-02 09:58:44 +02:00
parent 572de49dc2
commit a2eb05d4c4
2 changed files with 7 additions and 2 deletions

View File

@ -115,7 +115,10 @@ impl<'a> JpegCacheSlot<'a> {
}
fn is_for<'i: 'a>(&self, jpeg: &'i [u8], scale: u8) -> bool {
jpeg == self.jpeg && scale == self.scale && self.decoder.is_some()
jpeg.as_ptr() == self.jpeg.as_ptr()
&& jpeg.len() == self.jpeg.len()
&& scale == self.scale
&& self.decoder.is_some()
}
pub fn get_size<'i: 'a>(&mut self, jpeg: &'i [u8], scale: u8) -> Result<Offset, tjpgd::Error> {

View File

@ -92,7 +92,9 @@ impl<'a> ZlibCacheSlot<'a> {
}
fn is_for(&self, zdata: &[u8], offset: usize) -> bool {
self.zdata == zdata && self.offset == offset
self.zdata.as_ptr() == zdata.as_ptr()
&& self.zdata.len() == zdata.len()
&& self.offset == offset
}
}