use iterative rather than recursive method for following aliases (#573)

* use iterative rather than recursive method for following aliases

* this avoids consuming stack via plain recursive calls
This commit is contained in:
Dan Gieschen Knutson
2018-10-28 22:26:44 -05:00
committed by Dan Gohman
parent bf569b70dc
commit a19c6088f0
2 changed files with 9 additions and 5 deletions

View File

@@ -84,12 +84,12 @@ where
Keys::with_len(self.elems.len())
}
/// Iterate over all the keys in this map.
/// Iterate over all the values in this map.
pub fn values(&self) -> slice::Iter<V> {
self.elems.iter()
}
/// Iterate over all the keys in this map, mutable edition.
/// Iterate over all the values in this map, mutable edition.
pub fn values_mut(&mut self) -> slice::IterMut<V> {
self.elems.iter_mut()
}