diff --git a/core/embed/rust/src/ui/shape/bar.rs b/core/embed/rust/src/ui/shape/bar.rs index b23623cde1..67dbb65d3b 100644 --- a/core/embed/rust/src/ui/shape/bar.rs +++ b/core/embed/rust/src/ui/shape/bar.rs @@ -122,7 +122,7 @@ impl<'s> ShapeClone<'s> for Bar { where T: LocalAllocLeakExt<'alloc>, { - let clone = bump.alloc_t::()?; + let clone = bump.alloc_t()?; Some(clone.uninit.init(Bar { ..self })) } } diff --git a/core/embed/rust/src/ui/shape/blur.rs b/core/embed/rust/src/ui/shape/blur.rs index 8aca42951f..7f6faa29a2 100644 --- a/core/embed/rust/src/ui/shape/blur.rs +++ b/core/embed/rust/src/ui/shape/blur.rs @@ -39,7 +39,7 @@ impl<'s> ShapeClone<'s> for Blurring { where T: LocalAllocLeakExt<'alloc>, { - let clone = bump.alloc_t::()?; + let clone = bump.alloc_t()?; Some(clone.uninit.init(Blurring { ..self })) } } diff --git a/core/embed/rust/src/ui/shape/cache/blur_cache.rs b/core/embed/rust/src/ui/shape/cache/blur_cache.rs index 499ea07aa8..716e2ed882 100644 --- a/core/embed/rust/src/ui/shape/cache/blur_cache.rs +++ b/core/embed/rust/src/ui/shape/cache/blur_cache.rs @@ -15,7 +15,7 @@ impl<'a> BlurCache<'a> { T: LocalAllocLeakExt<'alloc>, { let buff = bump - .alloc_t::>()? + .alloc_t()? .uninit .init(UnsafeCell::new([0; 7928])); // TODO !!! 7928 diff --git a/core/embed/rust/src/ui/shape/cache/drawing_cache.rs b/core/embed/rust/src/ui/shape/cache/drawing_cache.rs index 1dfb6f88e2..1890234b15 100644 --- a/core/embed/rust/src/ui/shape/cache/drawing_cache.rs +++ b/core/embed/rust/src/ui/shape/cache/drawing_cache.rs @@ -45,7 +45,7 @@ where B: LocalAllocLeakExt<'a>, { Some( - bump.alloc_t::>()? + bump.alloc_t()? .uninit .init(RefCell::new([0; S])), ) diff --git a/core/embed/rust/src/ui/shape/cache/jpeg_cache.rs b/core/embed/rust/src/ui/shape/cache/jpeg_cache.rs index b3c026a85b..c3ad3cccd5 100644 --- a/core/embed/rust/src/ui/shape/cache/jpeg_cache.rs +++ b/core/embed/rust/src/ui/shape/cache/jpeg_cache.rs @@ -64,12 +64,12 @@ impl<'a> JpegCacheSlot<'a> { T: LocalAllocLeakExt<'alloc>, { let scratchpad = bump - .alloc_t::>()? + .alloc_t()? .uninit .init(UnsafeCell::new([0; JPEG_SCRATCHPAD_SIZE])); let canvas_buff = bump - .alloc_t::>()? + .alloc_t()? .uninit .init(UnsafeCell::new([0; JPEG_BUFF_SIZE])); diff --git a/core/embed/rust/src/ui/shape/cache/zlib_cache.rs b/core/embed/rust/src/ui/shape/cache/zlib_cache.rs index f1a8194c21..e992d74f27 100644 --- a/core/embed/rust/src/ui/shape/cache/zlib_cache.rs +++ b/core/embed/rust/src/ui/shape/cache/zlib_cache.rs @@ -23,7 +23,7 @@ impl<'a> ZlibCacheSlot<'a> { T: LocalAllocLeakExt<'alloc>, { let window = bump - .alloc_t::>()? + .alloc_t()? .uninit .init(UnsafeCell::new([0; UZLIB_WINDOW_SIZE])); diff --git a/core/embed/rust/src/ui/shape/canvas/common.rs b/core/embed/rust/src/ui/shape/canvas/common.rs index 4b043a99b7..347d8c864e 100644 --- a/core/embed/rust/src/ui/shape/canvas/common.rs +++ b/core/embed/rust/src/ui/shape/canvas/common.rs @@ -839,12 +839,12 @@ impl Rect { /// Returns a new `Rect` with potentially swapped left/right, /// top/bottom coordinates, ensuring that `x0`, `y0` represents /// the top-left corner and `x1`, `y1` represents the bottom-right corner. - pub fn normalize(&self) -> Self { + fn normalize(&self) -> Self { Rect { - x0: core::cmp::min(self.x0, self.x1), - y0: core::cmp::min(self.y0, self.y1), - x1: core::cmp::max(self.x0, self.x1), - y1: core::cmp::max(self.y0, self.y1), + x0: self.x0.min(self.x1), + y0: self.y0.min(self.y1), + x1: self.x0.max(self.x1), + y1: self.y0.max(self.y1), } } } diff --git a/core/embed/rust/src/ui/shape/circle.rs b/core/embed/rust/src/ui/shape/circle.rs index e390a26ae4..f1be75a5cf 100644 --- a/core/embed/rust/src/ui/shape/circle.rs +++ b/core/embed/rust/src/ui/shape/circle.rs @@ -133,7 +133,7 @@ impl<'s> ShapeClone<'s> for Circle { where T: LocalAllocLeakExt<'alloc>, { - let clone = bump.alloc_t::()?; + let clone = bump.alloc_t()?; Some(clone.uninit.init(Circle { ..self })) } } diff --git a/core/embed/rust/src/ui/shape/jpeg.rs b/core/embed/rust/src/ui/shape/jpeg.rs index 58aa1ee4c6..9984abf2f9 100644 --- a/core/embed/rust/src/ui/shape/jpeg.rs +++ b/core/embed/rust/src/ui/shape/jpeg.rs @@ -190,7 +190,7 @@ impl<'a> ShapeClone<'a> for JpegImage<'a> { where T: LocalAllocLeakExt<'alloc>, { - let clone = bump.alloc_t::()?; + let clone = bump.alloc_t()?; Some(clone.uninit.init(JpegImage { ..self })) } } diff --git a/core/embed/rust/src/ui/shape/qrcode.rs b/core/embed/rust/src/ui/shape/qrcode.rs index c9f956eb24..f92cb79bd6 100644 --- a/core/embed/rust/src/ui/shape/qrcode.rs +++ b/core/embed/rust/src/ui/shape/qrcode.rs @@ -163,7 +163,7 @@ impl<'s> ShapeClone<'s> for QrImage { where T: LocalAllocLeakExt<'alloc>, { - let clone = bump.alloc_t::()?; + let clone = bump.alloc_t()?; Some(clone.uninit.init(QrImage { ..self })) } } diff --git a/core/embed/rust/src/ui/shape/text.rs b/core/embed/rust/src/ui/shape/text.rs index cc83da8b25..32f62d9c8c 100644 --- a/core/embed/rust/src/ui/shape/text.rs +++ b/core/embed/rust/src/ui/shape/text.rs @@ -115,7 +115,7 @@ impl<'a, 's> ShapeClone<'s> for Text<'a> { where T: LocalAllocLeakExt<'alloc>, { - let clone = bump.alloc_t::()?; + let clone = bump.alloc_t()?; let text = bump.copy_str(self.text)?; Some(clone.uninit.init(Text { text, ..self })) } diff --git a/core/embed/rust/src/ui/shape/toif.rs b/core/embed/rust/src/ui/shape/toif.rs index f01dde5cfd..c7a3dfbcf3 100644 --- a/core/embed/rust/src/ui/shape/toif.rs +++ b/core/embed/rust/src/ui/shape/toif.rs @@ -168,7 +168,7 @@ impl<'a> ShapeClone<'a> for ToifImage<'a> { where T: LocalAllocLeakExt<'alloc>, { - let clone = bump.alloc_t::()?; + let clone = bump.alloc_t()?; Some(clone.uninit.init(ToifImage { ..self })) } }