mirror of
https://github.com/rust-lang/rust
synced 2024-07-05 18:09:59 +00:00
set self.is_known_utf8 to false in extend_from_slice
This commit is contained in:
parent
a299aa5df7
commit
e5167fe7bd
|
@ -480,7 +480,7 @@ pub fn from_box(boxed: Box<Wtf8>) -> 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user