mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Fix tyvar_behind_raw_pointer warnings
https://github.com/rust-lang/rust/issues/46906
This commit is contained in:
parent
cee2aadd82
commit
4d459bce32
20 changed files with 55 additions and 53 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue