Skip to content

Commit 900e6fa

Browse files
committed
make split_at_mut_unchecked const
1 parent e454c45 commit 900e6fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/str/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ impl str {
772772
///
773773
/// The caller must ensure that `mid` is a valid byte offset from the start
774774
/// of the string and falls on the boundary of a UTF-8 code point.
775-
unsafe fn split_at_mut_unchecked(&mut self, mid: usize) -> (&mut str, &mut str) {
775+
unsafe const fn split_at_mut_unchecked(&mut self, mid: usize) -> (&mut str, &mut str) {
776776
let len = self.len();
777777
let ptr = self.as_mut_ptr();
778778
// SAFETY: caller guarantees `mid` is on a char boundary.

0 commit comments

Comments
 (0)