Skip to content
Permalink
Browse files

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

  • Loading branch information
tetsuharuohzeki committed Dec 10, 2015
1 parent b756375 commit eff54f304e112e35e4c1c5322e1aee71389b73c5
Showing with 1 addition and 1 deletion.
  1. +1 −1 components/compositing/surface_map.rs
@@ -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"),
}

0 comments on commit eff54f3

Please sign in to comment.
You can’t perform that action at this time.