diff --git a/crates/sl-std/src/ascii/str.rs b/crates/sl-std/src/ascii/str.rs index 7b869ae0..2755491c 100644 --- a/crates/sl-std/src/ascii/str.rs +++ b/crates/sl-std/src/ascii/str.rs @@ -589,6 +589,21 @@ where } } +impl ops::IndexMut for Str { + fn index_mut(&mut self, index: usize) -> &mut Self::Output { + &mut self.chars_mut()[index] + } +} + +impl ops::IndexMut for Str +where + T: SliceIndex, +{ + fn index_mut(&mut self, index: T) -> &mut Self::Output { + index.index_mut(self) + } +} + impl<'a> TryFrom<&'a [u8]> for &'a Str { type Error = NotAscii;