style: Remove uninlineable function in PropertyDeclarationIterator.

That literally made no sense, and is probably leftover from where we passed Map
directly there.
This commit is contained in:
Emilio Cobos Álvarez 2017-08-28 21:24:06 +02:00
parent 3b11145ef7
commit f6e4c5547c
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -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)
}
}