mirror of
https://github.com/servo/servo.git
synced 2025-06-23 08:34:42 +01:00
auto merge of #1013 : huonw/servo/text-iter, r=pcwalton
And 3 other minor clean-ups: removing a redundant `if`, a redundant function call, and using `slice_from` where it is possible.
This commit is contained in:
commit
59d2d345c8
3 changed files with 5 additions and 18 deletions
|
@ -775,7 +775,7 @@ pub fn FindEnumStringIndex(cx: *JSContext,
|
|||
return Err(());
|
||||
}
|
||||
let length = 0;
|
||||
let chars = JS_GetStringCharsAndLength(cx, jsstr, ptr::to_unsafe_ptr(&length));
|
||||
let chars = JS_GetStringCharsAndLength(cx, jsstr, &length);
|
||||
if chars.is_null() {
|
||||
return Err(());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue