From 9f73ee3206c69a2db79cfb5d596b60926a829218 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 12 Jul 2023 09:03:24 +0200 Subject: Fix import consistency for `bytemuck` --- tiny_skia/src/text.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tiny_skia/src/text.rs') 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], -- cgit