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` --- core/src/pixels.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/src/pixels.rs') diff --git a/core/src/pixels.rs b/core/src/pixels.rs index 7d6267cf..c87e2b31 100644 --- a/core/src/pixels.rs +++ b/core/src/pixels.rs @@ -20,9 +20,9 @@ impl From for Pixels { } } -impl From for Pixels { - fn from(amount: u16) -> Self { - Self(f32::from(amount)) +impl From for Pixels { + fn from(amount: u32) -> Self { + Self(amount as f32) } } -- cgit