Skip to content

Commit

Permalink
Fix warning: Use iterator.min_by_key instead of iterator.min_by
Browse files Browse the repository at this point in the history
  • Loading branch information
tetsuharuohzeki committed Dec 10, 2015
1 parent b756375 commit eff54f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/compositing/surface_map.rs
Expand Up @@ -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"),
}
Expand Down

0 comments on commit eff54f3

Please sign in to comment.