diff --git a/src/candmap.rs b/src/candmap.rs index e460f9b..6d3b1e8 100644 --- a/src/candmap.rs +++ b/src/candmap.rs @@ -84,19 +84,19 @@ impl<'e, V> CandidateMap<'e, V> { /// See [HashMap::iter](std::collections::HashMap::iter) #[inline] - pub fn iter(&self) -> Iter<'_, 'e, V> { + pub fn iter<'a>(&'a self) -> impl Iterator { return Iter { map: &self, index: 0 }; } /// See [HashMap::iter_mut](std::collections::HashMap::iter_mut) #[inline] - pub fn iter_mut(&mut self) -> IterMut<'_, 'e, V> { + pub fn iter_mut<'a>(&'a mut self) -> impl Iterator { return IterMut { map: self, index: 0 }; } /// See [HashMap::values](std::collections::HashMap::values) #[inline] - pub fn values(&self) -> Values<'_, 'e, V> { + pub fn values<'a>(&'a self) -> impl Iterator { return Values { map: &self, index: 0 }; } } @@ -110,7 +110,7 @@ impl<'e, V> Index<&Candidate> for CandidateMap<'e, V> { } /// See [CandidateMap::iter] -pub struct Iter<'m, 'e, V> { +struct Iter<'m, 'e, V> { map: &'m CandidateMap<'e, V>, index: usize } @@ -146,7 +146,7 @@ impl<'m, 'e, V> Iterator for Iter<'m, 'e, V> { } /// See [CandidateMap::iter_mut] -pub struct IterMut<'m, 'e, V> { +struct IterMut<'m, 'e, V> { map: &'m mut CandidateMap<'e, V>, index: usize } @@ -187,7 +187,7 @@ impl<'m, 'e, V> Iterator for IterMut<'m, 'e, V> { } /// See [CandidateMap::values] -pub struct Values<'m, 'e, V> { +struct Values<'m, 'e, V> { map: &'m CandidateMap<'e, V>, index: usize }