Untry script

This commit is contained in:
Simon Sapin 2017-06-18 13:21:32 +02:00
parent a5bb55790f
commit 7af5a7fd54
36 changed files with 199 additions and 199 deletions

View file

@ -65,8 +65,8 @@ impl ImageData {
if let Some(jsobject) = opt_jsobject {
let cx = global.get_cx();
typedarray!(in(cx) let array_res: Uint8ClampedArray = jsobject);
let mut array = try!(array_res
.map_err(|_| Error::Type("Argument to Image data is not an Uint8ClampedArray".to_owned())));
let mut array = array_res
.map_err(|_| Error::Type("Argument to Image data is not an Uint8ClampedArray".to_owned()))?;
let byte_len = array.as_slice().len() as u32;
if byte_len % 4 != 0 {