From f3ae4266e9727940ba0d0e8469362923590916f4 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 9 Feb 2025 06:38:48 +0100 Subject: Implement `From` instead of `u16` for `Length` and `Pixels` --- examples/gallery/src/main.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'examples/gallery/src/main.rs') diff --git a/examples/gallery/src/main.rs b/examples/gallery/src/main.rs index 6175f396..3bc66382 100644 --- a/examples/gallery/src/main.rs +++ b/examples/gallery/src/main.rs @@ -97,10 +97,7 @@ impl Gallery { Task::batch(vec![ Task::perform( - image.clone().blurhash( - Preview::WIDTH as u32, - Preview::HEIGHT as u32, - ), + image.clone().blurhash(Preview::WIDTH, Preview::HEIGHT), move |result| Message::BlurhashDecoded(id, result), ), Task::perform( @@ -313,8 +310,8 @@ enum Preview { } impl Preview { - const WIDTH: u16 = 320; - const HEIGHT: u16 = 410; + const WIDTH: u32 = 320; + const HEIGHT: u32 = 410; fn blurhash(rgba: Rgba) -> Self { Self::Blurhash(Blurhash { -- cgit