From eff54f304e112e35e4c1c5322e1aee71389b73c5 Mon Sep 17 00:00:00 2001 From: Tetsuharu OHZEKI Date: Thu, 10 Dec 2015 16:21:08 -0500 Subject: [PATCH] Fix warning: Use iterator.min_by_key instead of iterator.min_by --- components/compositing/surface_map.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/compositing/surface_map.rs b/components/compositing/surface_map.rs index 09a3b733dd92..e91bbf5aaf5b 100644 --- a/components/compositing/surface_map.rs +++ b/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"), }