Skip to content

Commit

Permalink
Rollup merge of rust-lang#37215 - flodiebold:comment-fix, r=sfackler
Browse files Browse the repository at this point in the history
Update comment in Vec::dedup_by

It's a tiny thing, but I came across this comment which previously was in `dedup` and wasn't updated when `dedup_by` was introduced.
  • Loading branch information
GuillaumeGomez authored Oct 17, 2016
2 parents 3ff8ee1 + 187ddf3 commit b097790
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ impl<T> Vec<T> {
pub fn dedup_by<F>(&mut self, mut same_bucket: F) where F: FnMut(&mut T, &mut T) -> bool {
unsafe {
// Although we have a mutable reference to `self`, we cannot make
// *arbitrary* changes. The `PartialEq` comparisons could panic, so we
// *arbitrary* changes. The `same_bucket` calls could panic, so we
// must ensure that the vector is in a valid state at all time.
//
// The way that we handle this is by using swaps; we iterate
Expand Down

0 comments on commit b097790

Please sign in to comment.