Skip to content

Commit

Permalink
use u32::try_from instead
Browse files Browse the repository at this point in the history
  • Loading branch information
ratmice committed Nov 4, 2024
1 parent 9aa58a8 commit 5bb5258
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vello/src/scene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,7 @@ impl<'a> DrawGlyphs<'a> {
let image = match bitmap.data {
bitmap::BitmapData::Bgra(data) => {
if bitmap.width * bitmap.height * 4
!= <usize as std::convert::TryInto<u32>>::try_into(data.len())
.unwrap()
!= u32::try_from(data.len()).unwrap()
{
// TODO: Error once?
log::error!("Invalid font");
Expand Down

0 comments on commit 5bb5258

Please sign in to comment.