mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Stop using ptr.is_not_null() in script.
This method is deprecated in rust master; removing its users in advance will make a future rust upgrade smoother.
This commit is contained in:
parent
111a196e9d
commit
43eecf6e7a
8 changed files with 27 additions and 27 deletions
|
@ -33,7 +33,7 @@ pub unsafe extern fn getPropertyDescriptor(cx: *mut JSContext, proxy: *mut JSObj
|
|||
if !InvokeGetOwnPropertyDescriptor(handler, cx, proxy, id, set, desc) {
|
||||
return false;
|
||||
}
|
||||
if (*desc).obj.is_not_null() {
|
||||
if !(*desc).obj.is_null() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ pub fn _obj_toString(cx: *mut JSContext, name: &str) -> *mut JSString {
|
|||
let length = result.len() as libc::size_t;
|
||||
|
||||
let string = JS_NewStringCopyN(cx, chars, length);
|
||||
assert!(string.is_not_null());
|
||||
assert!(!string.is_null());
|
||||
return string;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue