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 { /// /// 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;