also fix bad use of shared ref in split_at_mut
This commit is contained in:
parent
a996f2c8dc
commit
66c894e07f
1 changed files with 1 additions and 1 deletions
|
@ -2516,7 +2516,7 @@ impl str {
|
|||
// is_char_boundary checks that the index is in [0, .len()]
|
||||
if self.is_char_boundary(mid) {
|
||||
let len = self.len();
|
||||
let ptr = self.as_ptr() as *mut u8;
|
||||
let ptr = self.as_mut_ptr();
|
||||
unsafe {
|
||||
(from_utf8_unchecked_mut(slice::from_raw_parts_mut(ptr, mid)),
|
||||
from_utf8_unchecked_mut(slice::from_raw_parts_mut(
|
||||
|
|
Loading…
Reference in a new issue