diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2018-01-04 18:13:44 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2018-01-10 20:54:35 +0100 |
commit | 4d459bce32a48e040399b3e05e66ba5ea26dd7f1 (patch) | |
tree | 1f572412428a0acda8b24e4f49be530b814509cc /components/script/dom/imagedata.rs | |
parent | cee2aadd828efa717d08a15eb2cb35fe0b7e6943 (diff) | |
download | servo-4d459bce32a48e040399b3e05e66ba5ea26dd7f1.tar.gz servo-4d459bce32a48e040399b3e05e66ba5ea26dd7f1.zip |
Fix tyvar_behind_raw_pointer warnings
https://github.com/rust-lang/rust/issues/46906
Diffstat (limited to 'components/script/dom/imagedata.rs')
-rw-r--r-- | components/script/dom/imagedata.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/imagedata.rs b/components/script/dom/imagedata.rs index f0270fbe7b7..6be4e5d89c2 100644 --- a/components/script/dom/imagedata.rs +++ b/components/script/dom/imagedata.rs @@ -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()); } |