mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Rustfmt some of script.
This commit is contained in:
parent
ceb72e54e4
commit
0c61be7a57
50 changed files with 1499 additions and 885 deletions
|
@ -45,7 +45,7 @@ impl DOMTokenList {
|
|||
match token {
|
||||
"" => Err(Error::Syntax),
|
||||
slice if slice.find(HTML_SPACE_CHARACTERS).is_some() => Err(Error::InvalidCharacter),
|
||||
slice => Ok(Atom::from_slice(slice))
|
||||
slice => Ok(Atom::from_slice(slice)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -99,9 +99,7 @@ impl DOMTokenListMethods for DOMTokenList {
|
|||
let mut atoms = self.element.get_tokenlist_attribute(&self.local_name);
|
||||
for token in &tokens {
|
||||
let token = try!(self.check_token_exceptions(&token));
|
||||
atoms.iter().position(|atom| *atom == token).map(|index| {
|
||||
atoms.remove(index)
|
||||
});
|
||||
atoms.iter().position(|atom| *atom == token).map(|index| atoms.remove(index));
|
||||
}
|
||||
self.element.set_atomic_tokenlist_attribute(&self.local_name, atoms);
|
||||
Ok(())
|
||||
|
@ -127,7 +125,7 @@ impl DOMTokenListMethods for DOMTokenList {
|
|||
self.element.set_atomic_tokenlist_attribute(&self.local_name, atoms);
|
||||
Ok(true)
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue