diff options
author | 2023-07-12 09:03:24 +0200 | |
---|---|---|
committer | 2023-07-12 09:03:24 +0200 | |
commit | 9f73ee3206c69a2db79cfb5d596b60926a829218 (patch) | |
tree | a8b7785685bb60ba7ff1c9dcfffbd786b726f948 /tiny_skia/src/text.rs | |
parent | af386fd0a3de432337ee9cdaa4d3661e98bd4105 (diff) | |
download | iced-9f73ee3206c69a2db79cfb5d596b60926a829218.tar.gz iced-9f73ee3206c69a2db79cfb5d596b60926a829218.tar.bz2 iced-9f73ee3206c69a2db79cfb5d596b60926a829218.zip |
Fix import consistency for `bytemuck`
Diffstat (limited to 'tiny_skia/src/text.rs')
-rw-r--r-- | tiny_skia/src/text.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tiny_skia/src/text.rs b/tiny_skia/src/text.rs index 58f7d145..15f25740 100644 --- a/tiny_skia/src/text.rs +++ b/tiny_skia/src/text.rs @@ -3,7 +3,6 @@ use crate::core::font::{self, Font}; use crate::core::text::{Hit, LineHeight, Shaping}; use crate::core::{Color, Pixels, Point, Rectangle, Size}; -use bytemuck::cast; use rustc_hash::{FxHashMap, FxHashSet}; use std::borrow::Cow; use std::cell::RefCell; @@ -289,7 +288,7 @@ impl GlyphCache { for _y in 0..image.placement.height { for _x in 0..image.placement.width { - buffer[i] = cast( + buffer[i] = bytemuck::cast( tiny_skia::ColorU8::from_rgba( b, g, @@ -309,7 +308,7 @@ impl GlyphCache { for _y in 0..image.placement.height { for _x in 0..image.placement.width { // TODO: Blend alpha - buffer[i >> 2] = cast( + buffer[i >> 2] = bytemuck::cast( tiny_skia::ColorU8::from_rgba( image.data[i + 2], image.data[i + 1], |