Auto merge of #8923 - saneyuki:warning2, r=nox

Fix warning: Use iterator.min_by_key instead of iterator.min_by

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8923)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-12-11 09:08:14 +05:30
commit 99b9901ca2

View file

@ -111,7 +111,7 @@ impl SurfaceMap {
let old_key = match opt_key {
Some(key) => key,
None => {
match self.map.iter().min_by(|&(_, x)| x.last_action) {
match self.map.iter().min_by_key(|&(_, x)| x.last_action) {
Some((k, _)) => *k,
None => panic!("SurfaceMap: tried to delete with no elements in map"),
}