diff options
author | Rosemary Ajayi <okhuomonajayi54@gmail.com> | 2024-03-27 22:14:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-27 22:14:41 +0000 |
commit | 072b892706e9f39a2cb3559c610509cae00ab5cc (patch) | |
tree | 3471611587e718bfaf633892224ad8b380247834 /components/script/dom/characterdata.rs | |
parent | 1c8c287f01757488733f5df501461bf1b74ca163 (diff) | |
download | servo-072b892706e9f39a2cb3559c610509cae00ab5cc.tar.gz servo-072b892706e9f39a2cb3559c610509cae00ab5cc.zip |
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
Diffstat (limited to 'components/script/dom/characterdata.rs')
-rw-r--r-- | components/script/dom/characterdata.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/characterdata.rs b/components/script/dom/characterdata.rs index 0de4f22d09a..3c053281bea 100644 --- a/components/script/dom/characterdata.rs +++ b/components/script/dom/characterdata.rs @@ -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}"; } }, }; |