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:
bors-servo 2013-10-09 16:19:24 -07:00
commit 59d2d345c8
3 changed files with 5 additions and 18 deletions

View file

@ -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(());
}