зеркало из https://github.com/mozilla/gecko-dev.git
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
This commit is contained in:
Родитель
e5727d7f5a
Коммит
c259a3a1b5
|
@ -97,12 +97,7 @@ impl<'a> Iterator for PropertyDeclarationIterator<'a> {
|
||||||
type Item = &'a PropertyDeclaration;
|
type Item = &'a PropertyDeclaration;
|
||||||
#[inline]
|
#[inline]
|
||||||
fn next(&mut self) -> Option<&'a PropertyDeclaration> {
|
fn next(&mut self) -> Option<&'a PropertyDeclaration> {
|
||||||
// we use this function because a closure won't be `Clone`
|
self.iter.next().map(|&(ref decl, _)| decl)
|
||||||
fn get_declaration(dec: &(PropertyDeclaration, Importance))
|
|
||||||
-> &PropertyDeclaration {
|
|
||||||
&dec.0
|
|
||||||
}
|
|
||||||
self.iter.next().map(get_declaration as fn(_) -> _)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче