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 eeae749 commit 0f639d7Copy full SHA for 0f639d7
library/core/src/str/mod.rs
@@ -785,8 +785,8 @@ impl str {
785
// SAFETY: caller guarantees `mid` is on a char boundary.
786
unsafe {
787
(
788
- from_utf8_unchecked_mut(slice::from_raw_parts(ptr, mid)),
789
- from_utf8_unchecked_mut(slice::from_raw_parts(ptr.add(mid), len - mid)),
+ from_utf8_unchecked(slice::from_raw_parts(ptr, mid)),
+ from_utf8_unchecked(slice::from_raw_parts(ptr.add(mid), len - mid)),
790
)
791
}
792
0 commit comments