Improve code example for length comparison
This commit is contained in:
parent
5e73bd1040
commit
b89c464bed
@ -2567,7 +2567,7 @@ pub fn splice<R, I>(&mut self, range: R, replace_with: I) -> Splice<'_, I::IntoI
|
||||
/// # let some_predicate = |x: &mut i32| { *x == 2 || *x == 3 || *x == 6 };
|
||||
/// # let mut vec = vec![1, 2, 3, 4, 5, 6];
|
||||
/// let mut i = 0;
|
||||
/// while i != vec.len() {
|
||||
/// while i < vec.len() {
|
||||
/// if some_predicate(&mut vec[i]) {
|
||||
/// let val = vec.remove(i);
|
||||
/// // your code here
|
||||
|
Loading…
Reference in New Issue
Block a user