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.
String
1 parent 0918568 commit 3a60212Copy full SHA for 3a60212
library/alloc/src/string.rs
@@ -1423,7 +1423,7 @@ impl String {
1423
1424
// SAFETY: Just reserved capacity for at least the length needed to encode `ch`.
1425
unsafe {
1426
- core::char::encode_utf8_raw_unchecked(ch as u32, self.as_mut_ptr().add(self.len()));
+ core::char::encode_utf8_raw_unchecked(ch as u32, self.vec.as_mut_ptr().add(self.len()));
1427
self.vec.set_len(len + ch_len);
1428
}
1429
0 commit comments