Skip to content

Commit

Permalink
Use cast instead of as.
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys committed Jan 4, 2024
1 parent 9dc56ff commit 3f46f84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/typed_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ impl JSTypedArray {
assert!(!ptr.is_null(), "`ptr` must not be null");

Ok(slice::from_raw_parts_mut(
ptr.offset(offset.try_into().unwrap()) as *mut u8,
ptr.offset(offset.try_into().unwrap()).cast::<u8>(),
length,
))
}
Expand Down

0 comments on commit 3f46f84

Please sign in to comment.