diff options
author | Pyfisch <pyfisch@gmail.com> | 2018-11-06 16:08:50 +0100 |
---|---|---|
committer | Pyfisch <pyfisch@gmail.com> | 2018-11-06 22:30:31 +0100 |
commit | 095d446ccda70c3174c31afe545bb11c22cf43be (patch) | |
tree | eece498642269a1cdfd6a9b6405e5823175d84b6 /components/script/dom/bindings/utils.rs | |
parent | cb07debcb6f3d3561177ce536c320986720791b7 (diff) | |
download | servo-095d446ccda70c3174c31afe545bb11c22cf43be.tar.gz servo-095d446ccda70c3174c31afe545bb11c22cf43be.zip |
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.
Diffstat (limited to 'components/script/dom/bindings/utils.rs')
-rw-r--r-- | components/script/dom/bindings/utils.rs | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs index 9ad2122430f..7a48349e594 100644 --- a/components/script/dom/bindings/utils.rs +++ b/components/script/dom/bindings/utils.rs @@ -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 |