From 61d77756736f83fdd8ac9517f6a824ecef683117 Mon Sep 17 00:00:00 2001 From: sagu <16504129+sagudev@users.noreply.github.com> Date: Tue, 30 Mar 2021 06:21:05 +0200 Subject: [PATCH] Update imagedata.rs --- components/script/dom/imagedata.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();