From c259a3a1b58614ef646546e693cacdff2760fac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 28 Aug 2017 19:18:37 -0500 Subject: [PATCH] servo: Merge #18282 - style: Remove uninlineable function in PropertyDeclarationIterator (from emilio:moar-parsing); r=jdm That literally made no sense, and is probably leftover from where we passed Map directly there. Source-Repo: https://github.com/servo/servo Source-Revision: 9e2f243b4d7015f67b4ea8310c9d242ec2eb6f69 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 51d6c5febdc78943d1276ae436b3433024059b12 --- servo/components/style/properties/declaration_block.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/servo/components/style/properties/declaration_block.rs b/servo/components/style/properties/declaration_block.rs index 54ffa4621fd0..790b158a7e4e 100644 --- a/servo/components/style/properties/declaration_block.rs +++ b/servo/components/style/properties/declaration_block.rs @@ -97,12 +97,7 @@ impl<'a> Iterator for PropertyDeclarationIterator<'a> { type Item = &'a PropertyDeclaration; #[inline] fn next(&mut self) -> Option<&'a PropertyDeclaration> { - // we use this function because a closure won't be `Clone` - fn get_declaration(dec: &(PropertyDeclaration, Importance)) - -> &PropertyDeclaration { - &dec.0 - } - self.iter.next().map(get_declaration as fn(_) -> _) + self.iter.next().map(|&(ref decl, _)| decl) } }