added clippy suggestions

This commit is contained in:
TheEggShark 2023-12-03 16:20:47 -06:00 committed by Josh Groves
parent f554de853b
commit f13c5f024e
2 changed files with 4 additions and 4 deletions

View file

@ -87,7 +87,7 @@ impl InnerAtlas {
// Find a glyph with an actual size
while value.atlas_id.is_none() {
// All sized glyphs are in use, cache is full
if self.glyphs_in_use.contains(&key) {
if self.glyphs_in_use.contains(key) {
return None;
}
@ -97,7 +97,7 @@ impl InnerAtlas {
}
// All sized glyphs are in use, cache is full
if self.glyphs_in_use.contains(&key) {
if self.glyphs_in_use.contains(key) {
return None;
}

View file

@ -306,7 +306,7 @@ impl TextRenderer {
let vertices_raw = unsafe {
slice::from_raw_parts(
vertices as *const _ as *const u8,
size_of::<GlyphToRender>() * vertices.len(),
std::mem::size_of_val(vertices),
)
};
@ -330,7 +330,7 @@ impl TextRenderer {
let indices_raw = unsafe {
slice::from_raw_parts(
indices as *const _ as *const u8,
size_of::<u32>() * indices.len(),
std::mem::size_of_val(indices),
)
};