diff options
Diffstat (limited to 'openssl/src/stack.rs')
-rw-r--r-- | openssl/src/stack.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/openssl/src/stack.rs b/openssl/src/stack.rs index b412029b..e5f32c77 100644 --- a/openssl/src/stack.rs +++ b/openssl/src/stack.rs @@ -50,7 +50,7 @@ where T: Stackable, T::Ref: fmt::Debug, { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { fmt.debug_list().entries(self).finish() } } @@ -199,14 +199,14 @@ impl<T: Stackable> StackRef<T> { self.len() == 0 } - pub fn iter(&self) -> Iter<T> { + pub fn iter(&self) -> Iter<'_, T> { Iter { stack: self, idxs: 0..self.len() as c_int, } } - pub fn iter_mut(&mut self) -> IterMut<T> { + pub fn iter_mut(&mut self) -> IterMut<'_, T> { IterMut { idxs: 0..self.len() as c_int, stack: self, @@ -310,10 +310,7 @@ impl<'a, T: Stackable> iter::IntoIterator for &'a mut Stack<T> { } /// An iterator over the stack's contents. -pub struct Iter<'a, T: Stackable> -where - T: 'a, -{ +pub struct Iter<'a, T: Stackable> { stack: &'a StackRef<T>, idxs: Range<c_int>, } @@ -347,7 +344,7 @@ impl<'a, T: Stackable> DoubleEndedIterator for Iter<'a, T> { impl<'a, T: Stackable> ExactSizeIterator for Iter<'a, T> {} /// A mutable iterator over the stack's contents. -pub struct IterMut<'a, T: Stackable + 'a> { +pub struct IterMut<'a, T: Stackable> { stack: &'a mut StackRef<T>, idxs: Range<c_int>, } |