mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
cargo: Bump rustc to 1.89 (#36818)
Update Rustc to 1.89. Reviewable by commit. Leftover work: - #37330 - #38777 --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
8587536755
commit
3225d19907
126 changed files with 408 additions and 610 deletions
|
@ -89,10 +89,7 @@ impl DOMTokenList {
|
|||
)),
|
||||
Some(supported_tokens) => {
|
||||
let token = Atom::from(token).to_ascii_lowercase();
|
||||
if supported_tokens
|
||||
.iter()
|
||||
.any(|supported_token| *supported_token == token)
|
||||
{
|
||||
if supported_tokens.contains(&token) {
|
||||
return Ok(true);
|
||||
}
|
||||
Ok(false)
|
||||
|
@ -123,12 +120,8 @@ impl DOMTokenListMethods<crate::DomTypeHolder> for DOMTokenList {
|
|||
/// <https://dom.spec.whatwg.org/#dom-domtokenlist-contains>
|
||||
fn Contains(&self, token: DOMString) -> bool {
|
||||
let token = Atom::from(token);
|
||||
self.attribute().is_some_and(|attr| {
|
||||
attr.value()
|
||||
.as_tokens()
|
||||
.iter()
|
||||
.any(|atom: &Atom| *atom == token)
|
||||
})
|
||||
self.attribute()
|
||||
.is_some_and(|attr| attr.value().as_tokens().contains(&token))
|
||||
}
|
||||
|
||||
/// <https://dom.spec.whatwg.org/#dom-domtokenlist-add>
|
||||
|
@ -136,7 +129,7 @@ impl DOMTokenListMethods<crate::DomTypeHolder> for DOMTokenList {
|
|||
let mut atoms = self.element.get_tokenlist_attribute(&self.local_name);
|
||||
for token in &tokens {
|
||||
let token = self.check_token_exceptions(token)?;
|
||||
if !atoms.iter().any(|atom| *atom == token) {
|
||||
if !atoms.contains(&token) {
|
||||
atoms.push(token);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue