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