diff options
Diffstat (limited to 'src/libunicode/u_str.rs')
| -rw-r--r-- | src/libunicode/u_str.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libunicode/u_str.rs b/src/libunicode/u_str.rs index 13672a7b480..66cdf03a51e 100644 --- a/src/libunicode/u_str.rs +++ b/src/libunicode/u_str.rs @@ -249,8 +249,8 @@ impl<'a> Iterator for Graphemes<'a> { Some(cat) }; - let retstr = self.string.slice_to(idx); - self.string = self.string.slice_from(idx); + let retstr = &self.string[..idx]; + self.string = &self.string[idx..]; Some(retstr) } } @@ -350,8 +350,8 @@ impl<'a> DoubleEndedIterator for Graphemes<'a> { Some(cat) }; - let retstr = self.string.slice_from(idx); - self.string = self.string.slice_to(idx); + let retstr = &self.string[idx..]; + self.string = &self.string[..idx]; Some(retstr) } } |
