mirror of
https://github.com/servo/servo.git
synced 2025-08-02 12:10:29 +01:00
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:
commit
99b9901ca2
1 changed files with 1 additions and 1 deletions
|
@ -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"),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue