Use VecDeque::front instead of an iterator.
@@ -506,7 +506,7 @@ impl OriginsHistory {
pub fn current_metrics<F>(&self, op: F)
where F: FnMut(&Metrics) {
- self.0.read().unwrap().metrics.iter().next().map(op);
+ self.0.read().unwrap().metrics.front().map(op);
}
pub fn metrics<F>(&self, op: F)
