diff options
| -rw-r--r-- | core/src/length.rs | 6 | ||||
| -rw-r--r-- | core/src/pixels.rs | 6 | ||||
| -rw-r--r-- | examples/gallery/src/civitai.rs | 2 | ||||
| -rw-r--r-- | examples/gallery/src/main.rs | 9 | ||||
| -rw-r--r-- | examples/scrollable/src/main.rs | 12 | ||||
| -rw-r--r-- | examples/tour/src/main.rs | 14 |
6 files changed, 23 insertions, 26 deletions
diff --git a/core/src/length.rs b/core/src/length.rs index 5f24169f..363833c4 100644 --- a/core/src/length.rs +++ b/core/src/length.rs @@ -77,8 +77,8 @@ impl From<f32> for Length { } } -impl From<u16> for Length { - fn from(units: u16) -> Self { - Length::Fixed(f32::from(units)) +impl From<u32> for Length { + fn from(units: u32) -> Self { + Length::Fixed(units as f32) } } 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<f32> for Pixels { } } -impl From<u16> for Pixels { - fn from(amount: u16) -> Self { - Self(f32::from(amount)) +impl From<u32> for Pixels { + fn from(amount: u32) -> Self { + Self(amount as f32) } } diff --git a/examples/gallery/src/civitai.rs b/examples/gallery/src/civitai.rs index c394ef1d..457091e9 100644 --- a/examples/gallery/src/civitai.rs +++ b/examples/gallery/src/civitai.rs @@ -125,7 +125,7 @@ impl fmt::Debug for Rgba { #[derive(Debug, Clone, Copy)] pub enum Size { Original, - Thumbnail { width: u16 }, + Thumbnail { width: u32 }, } #[derive(Debug, Clone)] 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