Skip to content

Commit

Permalink
Improve code example for length comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez authored Apr 12, 2021
1 parent 5e73bd1 commit b89c464
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2567,7 +2567,7 @@ impl<T, A: Allocator> Vec<T, A> {
/// # 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
Expand Down

0 comments on commit b89c464

Please sign in to comment.