clippy:fix various clippy problems in components/scripts (#31907)

* manual implementation of an assign operation

* manual implementation of an assign operation

* single-character string

* manual cjheck for common ascii range
This commit is contained in:
Rosemary Ajayi 2024-03-27 22:14:41 +00:00 committed by GitHub
parent 1c8c287f01
commit 072b892706
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 14 deletions

View file

@ -136,7 +136,7 @@ impl CharacterDataMethods for CharacterData {
// and then transcoded that to UTF-8 lossily,
// since our DOMString is currently strict UTF-8.
if astral.is_some() {
substring = substring + "\u{FFFD}";
substring += "\u{FFFD}";
}
remaining = s;
},
@ -145,7 +145,7 @@ impl CharacterDataMethods for CharacterData {
}
match split_at_utf16_code_unit_offset(remaining, count, replace_surrogates) {
// Steps 3.
Err(()) => substring = substring + remaining,
Err(()) => substring += remaining,
// Steps 4.
Ok((s, astral, _)) => {
substring = substring + s;
@ -153,7 +153,7 @@ impl CharacterDataMethods for CharacterData {
// and then transcoded that to UTF-8 lossily,
// since our DOMString is currently strict UTF-8.
if astral.is_some() {
substring = substring + "\u{FFFD}";
substring += "\u{FFFD}";
}
},
};