mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
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:
parent
1c8c287f01
commit
072b892706
4 changed files with 14 additions and 14 deletions
|
@ -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}";
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue