diff options
| author | ash <97464181+Borgerr@users.noreply.github.com> | 2024-06-25 23:58:43 -0600 |
|---|---|---|
| committer | ash <97464181+Borgerr@users.noreply.github.com> | 2024-06-25 23:58:43 -0600 |
| commit | e5167fe7bd52a8eaebbf01d0b1469785306f4a96 (patch) | |
| tree | ff5d074cdf39fa599ec7346a18878b5679c648bc /library/std/src | |
| parent | a299aa5df79dd8e5a1405b97ddd7b367b61eecc6 (diff) | |
| download | rust-e5167fe7bd52a8eaebbf01d0b1469785306f4a96.tar.gz rust-e5167fe7bd52a8eaebbf01d0b1469785306f4a96.zip | |
set self.is_known_utf8 to false in extend_from_slice
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/sys_common/wtf8.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys_common/wtf8.rs b/library/std/src/sys_common/wtf8.rs index 708f62f476e..117a3e23044 100644 --- a/library/std/src/sys_common/wtf8.rs +++ b/library/std/src/sys_common/wtf8.rs @@ -480,7 +480,7 @@ impl Wtf8Buf { #[inline] pub(crate) fn extend_from_slice(&mut self, other: &[u8]) { self.bytes.extend_from_slice(other); - self.is_known_utf8 = self.is_known_utf8 || self.next_surrogate(0).is_none(); + self.is_known_utf8 = false; } } |
