mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix various build warnings.
This commit is contained in:
parent
717805a593
commit
1604515fd9
16 changed files with 32 additions and 35 deletions
|
@ -197,7 +197,7 @@ pub fn do_create_interface_objects(cx: *mut JSContext, global: *mut JSObject,
|
|||
|
||||
match constructor {
|
||||
Some((native, name, nargs)) => {
|
||||
let s = CString::from_slice(name.as_bytes());
|
||||
let s = CString::new(name).unwrap();
|
||||
create_interface_object(cx, global, receiver,
|
||||
native, nargs, proto,
|
||||
members, s.as_ptr())
|
||||
|
@ -516,7 +516,7 @@ pub fn get_dictionary_property(cx: *mut JSContext,
|
|||
}
|
||||
}
|
||||
|
||||
let property = CString::from_slice(property.as_bytes());
|
||||
let property = CString::new(property).unwrap();
|
||||
if object.is_null() {
|
||||
return Ok(None);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue