Skip to content

Commit

Permalink
set self.is_known_utf8 to false in extend_from_slice
Browse files Browse the repository at this point in the history
  • Loading branch information
Borgerr committed Jun 26, 2024
1 parent 5aedb8a commit 57c2de8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/src/sys_common/wtf8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 57c2de8

Please sign in to comment.