mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
a9627d233f
commit
1333b6ee45
5 changed files with 24 additions and 24 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue