Fix import consistency for bytemuck

This commit is contained in:
Héctor Ramón Jiménez 2023-07-12 09:03:24 +02:00
parent af386fd0a3
commit 9f73ee3206
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
3 changed files with 6 additions and 8 deletions

View file

@ -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],