about summary refs log tree commit diff
path: root/src/liballoc/string.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/liballoc/string.rs')
-rw-r--r--src/liballoc/string.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs
index 6b28687a060..631779a17a1 100644
--- a/src/liballoc/string.rs
+++ b/src/liballoc/string.rs
@@ -1222,7 +1222,7 @@ impl String {
 
         while idx < len {
             let ch = unsafe {
-                self.slice_unchecked(idx, len).chars().next().unwrap()
+                self.get_unchecked(idx..len).chars().next().unwrap()
             };
             let ch_len = ch.len_utf8();