(&self, predicate: P) -> Option<&T> where P: Fn(&T) -> bool { if self.pending.as_ref().map(|r| predicate(r)).unwrap_or(false) { self.pending.as_ref() } else { self.in_use.iter().find(|r| predicate(r)) } } /// Returns the most recently pushed block if `f` returns `true` with a reference to it as /// a parameter, otherwise `None`. /// Will not destroy a block if a reference to it has previously been returned by `use_last_ref`, /// but rather clone it. pub fn pop_if
(&mut self, predicate: P) -> Option