We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 712adca commit dbfc619Copy full SHA for dbfc619
library/std/src/sys_common/wtf8.rs
@@ -480,7 +480,7 @@ impl Wtf8Buf {
480
#[inline]
481
pub(crate) fn extend_from_slice(&mut self, other: &[u8]) {
482
self.bytes.extend_from_slice(other);
483
- self.is_known_utf8 = false;
+ self.is_known_utf8 = self.is_known_utf8 && str::from_utf8(other).is_ok();
484
}
485
486
0 commit comments