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 0842f2c commit eb14652Copy full SHA for eb14652
library/std/src/sys_common/wtf8.rs
@@ -388,7 +388,7 @@ impl Wtf8Buf {
388
_ => {
389
// If we'll be pushing a string containing a surrogate, we may
390
// no longer have UTF-8.
391
- if other.next_surrogate(0).is_some() {
+ if self.is_known_utf8 && other.next_surrogate(0).is_some() {
392
self.is_known_utf8 = false;
393
}
394
0 commit comments