Skip to content

Commit

Permalink
also fix bad use of shared ref in split_at_mut
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Feb 7, 2019
1 parent a996f2c commit 66c894e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 66c894e

Please sign in to comment.