Fix tyvar_behind_raw_pointer warnings

https://github.com/rust-lang/rust/issues/46906
This commit is contained in:
Simon Sapin 2018-01-04 18:13:44 +01:00
parent cee2aadd82
commit 4d459bce32
20 changed files with 55 additions and 53 deletions

View file

@ -36,7 +36,7 @@ impl ImageData {
let len = width * height * 4;
unsafe {
let cx = global.get_cx();
rooted!(in (cx) let mut js_object = ptr::null_mut());
rooted!(in (cx) let mut js_object = ptr::null_mut::<JSObject>());
let data = match data {
Some(ref mut d) => {
d.resize(len as usize, 0);
@ -103,7 +103,7 @@ impl ImageData {
} else {
let len = width * height * 4;
let cx = global.get_cx();
rooted!(in (cx) let mut array = ptr::null_mut());
rooted!(in (cx) let mut array = ptr::null_mut::<JSObject>());
Uint8ClampedArray::create(cx, CreateWith::Length(len), array.handle_mut()).unwrap();
(*imagedata).data.set(array.get());
}