Skip to content

Commit 0f639d7

Browse files
committed
correct mutability
1 parent eeae749 commit 0f639d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: library/core/src/str/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -785,8 +785,8 @@ impl str {
785785
// SAFETY: caller guarantees `mid` is on a char boundary.
786786
unsafe {
787787
(
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)),
788+
from_utf8_unchecked(slice::from_raw_parts(ptr, mid)),
789+
from_utf8_unchecked(slice::from_raw_parts(ptr.add(mid), len - mid)),
790790
)
791791
}
792792
}

0 commit comments

Comments
 (0)