diff options
| author | Tim Vermeulen <tvermeulen@me.com> | 2019-03-12 17:53:25 +0100 |
|---|---|---|
| committer | Tim Vermeulen <tvermeulen@me.com> | 2019-03-12 17:53:25 +0100 |
| commit | 0de63d901b8ec550179b17ea06756e679b9fd461 (patch) | |
| tree | 792e13d7fa7ca25b8401c9747bbc0b29ed8eb9aa | |
| parent | b23a0473b366134ffa792fc52f538c0577a3a397 (diff) | |
| download | rust-0de63d901b8ec550179b17ea06756e679b9fd461.tar.gz rust-0de63d901b8ec550179b17ea06756e679b9fd461.zip | |
Fix comment
| -rw-r--r-- | src/libcore/iter/traits/iterator.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/iter/traits/iterator.rs b/src/libcore/iter/traits/iterator.rs index 199c6cdfa48..980de229fa6 100644 --- a/src/libcore/iter/traits/iterator.rs +++ b/src/libcore/iter/traits/iterator.rs @@ -2125,7 +2125,7 @@ pub trait Iterator { fn min_by<F>(self, mut compare: F) -> Option<Self::Item> where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering, { - // switch to y even if it is strictly smaller, to preserve stability. + // only switch to y if it is strictly smaller, to preserve stability. select_fold1(self, |x, y| compare(x, y) == Ordering::Greater) } |
