From 454b8140ecb1575a1adafb8e57051e345a32255e Mon Sep 17 00:00:00 2001 From: cepetr Date: Wed, 25 Sep 2024 11:08:34 +0200 Subject: [PATCH] fix(core): fix slow jpeg decoding [no changelog] --- core/embed/rust/src/io.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/embed/rust/src/io.rs b/core/embed/rust/src/io.rs index a137955dbff..e826f576053 100644 --- a/core/embed/rust/src/io.rs +++ b/core/embed/rust/src/io.rs @@ -166,6 +166,10 @@ impl<'a> PartialEq for BinaryData<'a> { #[cfg(feature = "micropython")] (Self::Object(a), Self::Object(b)) => a == b, #[cfg(feature = "micropython")] + (Self::AllocatedSlice(a), Self::AllocatedSlice(b)) => { + a.as_ptr() == b.as_ptr() && a.len() == b.len() + } + #[cfg(feature = "micropython")] _ => false, } }