mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
Remove as_slice() calls from script.
This commit is contained in:
parent
ef536372cd
commit
a862479ca8
42 changed files with 115 additions and 124 deletions
|
@ -70,8 +70,8 @@ fn get_attr(element: JSRef<Element>, local_name: &Atom) -> Option<String> {
|
|||
fn is_stylesheet(value: &Option<String>) -> bool {
|
||||
match *value {
|
||||
Some(ref value) => {
|
||||
value.as_slice().split(HTML_SPACE_CHARACTERS.as_slice())
|
||||
.any(|s| s.as_slice().eq_ignore_ascii_case("stylesheet"))
|
||||
value.split(HTML_SPACE_CHARACTERS)
|
||||
.any(|s| s.eq_ignore_ascii_case("stylesheet"))
|
||||
},
|
||||
None => false,
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLLinkElement> {
|
|||
|
||||
match (rel, href) {
|
||||
(ref rel, Some(ref href)) if is_stylesheet(rel) => {
|
||||
self.handle_stylesheet_url(href.as_slice());
|
||||
self.handle_stylesheet_url(href);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue