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:
Emilio Cobos Álvarez 2018-01-16 21:40:17 +01:00
parent 1e72a12265
commit e55bb3e76d
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 2 additions and 2 deletions

View file

@ -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)))