diff --git a/components/script/dom/imagedata.rs b/components/script/dom/imagedata.rs index cc7699bd5f3..0909def3ca0 100644 --- a/components/script/dom/imagedata.rs +++ b/components/script/dom/imagedata.rs @@ -116,7 +116,7 @@ impl ImageData { rooted!(in (*cx) let mut array = ptr::null_mut::()); Uint8ClampedArray::create( *cx, - CreateWith::Length(len.try_into().unwrap()), + CreateWith::Length(len as usize), array.handle_mut(), ) .unwrap();