Fix the build for NLL

Test with `RUSTFLAGS="-Zborrowck=mir -Ztwo-phase-borrows" cargo build`

https://internals.rust-lang.org/t/help-us-get-non-lexical-lifetimes-nll-over-the-finish-line/7807/7
This commit is contained in:
Simon Sapin 2018-08-08 00:09:02 +02:00
parent a9627d233f
commit 1333b6ee45
5 changed files with 24 additions and 24 deletions

View file

@ -65,7 +65,7 @@ impl ImageData {
if let Some(jsobject) = opt_jsobject {
let cx = global.get_cx();
typedarray!(in(cx) let array_res: Uint8ClampedArray = jsobject);
let mut array = array_res
let 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;