mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Manually format remaining problems
Use line comments instead of block comments as block comments contain trailing whitespace after formatting with rustfmt. Skip tests for malloc_size_of and script_plugins with rustfmt as they have many block comments.
This commit is contained in:
parent
cb07debcb6
commit
095d446ccd
5 changed files with 51 additions and 52 deletions
|
@ -172,19 +172,20 @@ pub fn get_array_index_from_id(_cx: *mut JSContext, id: HandleId) -> Option<u32>
|
|||
None
|
||||
}
|
||||
// if id is length atom, -1, otherwise
|
||||
/*return if JSID_IS_ATOM(id) {
|
||||
let atom = JSID_TO_ATOM(id);
|
||||
//let s = *GetAtomChars(id);
|
||||
if s > 'a' && s < 'z' {
|
||||
return -1;
|
||||
}
|
||||
|
||||
let i = 0;
|
||||
let str = AtomToLinearString(JSID_TO_ATOM(id));
|
||||
return if StringIsArray(str, &mut i) != 0 { i } else { -1 }
|
||||
} else {
|
||||
IdToInt32(cx, id);
|
||||
}*/}
|
||||
// return if JSID_IS_ATOM(id) {
|
||||
// let atom = JSID_TO_ATOM(id);
|
||||
// //let s = *GetAtomChars(id);
|
||||
// if s > 'a' && s < 'z' {
|
||||
// return -1;
|
||||
// }
|
||||
//
|
||||
// let i = 0;
|
||||
// let str = AtomToLinearString(JSID_TO_ATOM(id));
|
||||
// return if StringIsArray(str, &mut i) != 0 { i } else { -1 }
|
||||
// } else {
|
||||
// IdToInt32(cx, id);
|
||||
// }
|
||||
}
|
||||
|
||||
/// Find the enum equivelent of a string given by `v` in `pairs`.
|
||||
/// Returns `Err(())` on JSAPI failure (there is a pending exception), and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue