Update imagedata.rs

This commit is contained in:
sagu 2021-03-30 06:21:05 +02:00 committed by GitHub
parent b3126eaa3f
commit 61d7775673
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -116,7 +116,7 @@ impl ImageData {
rooted!(in (*cx) let mut array = ptr::null_mut::<JSObject>()); rooted!(in (*cx) let mut array = ptr::null_mut::<JSObject>());
Uint8ClampedArray::create( Uint8ClampedArray::create(
*cx, *cx,
CreateWith::Length(len.try_into().unwrap()), CreateWith::Length(len as usize),
array.handle_mut(), array.handle_mut(),
) )
.unwrap(); .unwrap();