mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix warning: Use iterator.min_by_key instead of iterator.min_by
This commit is contained in:
parent
b756375637
commit
eff54f304e
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