about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcollections/str.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs
index 19c085df2c4..99547b9c60a 100644
--- a/src/libcollections/str.rs
+++ b/src/libcollections/str.rs
@@ -1086,7 +1086,7 @@ pub trait StrExt: Index<RangeFull, Output = str> {
     ///
     /// let s = "中华Việt Nam";
     /// let mut i = s.len();
-    /// while i < 0 {
+    /// while i > 0 {
     ///     let CharRange {ch, next} = s.char_range_at_reverse(i);
     ///     println!("{}: {}", i, ch);
     ///     i = next;