about summary refs log tree commit diff
path: root/library/std/src/sys_common
diff options
context:
space:
mode:
authorash <97464181+Borgerr@users.noreply.github.com>2024-06-25 23:58:43 -0600
committerash <97464181+Borgerr@users.noreply.github.com>2024-06-25 23:58:43 -0600
commite5167fe7bd52a8eaebbf01d0b1469785306f4a96 (patch)
treeff5d074cdf39fa599ec7346a18878b5679c648bc /library/std/src/sys_common
parenta299aa5df79dd8e5a1405b97ddd7b367b61eecc6 (diff)
downloadrust-e5167fe7bd52a8eaebbf01d0b1469785306f4a96.tar.gz
rust-e5167fe7bd52a8eaebbf01d0b1469785306f4a96.zip
set self.is_known_utf8 to false in extend_from_slice
Diffstat (limited to 'library/std/src/sys_common')
-rw-r--r--library/std/src/sys_common/wtf8.rs2
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;
     }
 }