mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fixed the changing alt syntax and cleaned up some compiler warnings
This commit is contained in:
parent
f290f18087
commit
0b796c410c
40 changed files with 482 additions and 485 deletions
|
@ -55,10 +55,10 @@ fn jsval_to_str(cx: *JSContext, v: jsval) -> result<~str, ()> {
|
|||
|
||||
unsafe fn domstring_to_jsval(cx: *JSContext, str: DOMString) -> jsval {
|
||||
alt str {
|
||||
null_string {
|
||||
null_string => {
|
||||
JSVAL_NULL
|
||||
}
|
||||
str(s) {
|
||||
str(s) => {
|
||||
str::as_buf(s, |buf, len| {
|
||||
let cbuf = unsafe::reinterpret_cast(buf);
|
||||
RUST_STRING_TO_JSVAL(JS_NewStringCopyN(cx, cbuf, len as libc::size_t))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue