mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Always inline GeckoElement::has_class.
It's easier, and probably faster, than trying to inline the function call to Gecko. This symbol is in libxul.so as of right now.
This commit is contained in:
parent
1e72a12265
commit
e55bb3e76d
2 changed files with 2 additions and 2 deletions
|
@ -34,7 +34,7 @@ pub fn has_class<T>(
|
|||
let classes = slice::from_raw_parts(list, n as usize);
|
||||
match case_sensitivity {
|
||||
CaseSensitivity::CaseSensitive => {
|
||||
classes.iter().any(|ptr| name == WeakAtom::new(*ptr))
|
||||
classes.iter().any(|ptr| &**name == WeakAtom::new(*ptr))
|
||||
}
|
||||
CaseSensitivity::AsciiCaseInsensitive => {
|
||||
classes.iter().any(|ptr| name.eq_ignore_ascii_case(WeakAtom::new(*ptr)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue