Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
lincot committed Dec 20, 2024
1 parent a0cd2e0 commit 49bd467
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1783,11 +1783,7 @@ impl String {
// ahead. This is safe because sufficient capacity was just reserved, and `idx`
// is a char boundary.
unsafe {
ptr::copy(
self.vec.as_ptr().add(idx),
self.vec.as_mut_ptr().add(idx + amt),
len - idx,
);
ptr::copy(self.vec.as_ptr().add(idx), self.vec.as_mut_ptr().add(idx + amt), len - idx);
}

// SAFETY: Copy the new string slice into the vacated region if `idx != len`,
Expand Down

0 comments on commit 49bd467

Please sign in to comment.