diff options
| author | Steven Fackler <[email protected]> | 2016-11-05 10:54:17 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-11-05 10:54:17 -0700 |
| commit | f15c817c2d1fad288fe0f88d4e3995df4aa4a477 (patch) | |
| tree | 01654c34f4c71b7ee30b5ba7b6e0bde61cd905da /openssl/src/stack.rs | |
| parent | Remove unused dependency (diff) | |
| download | rust-openssl-f15c817c2d1fad288fe0f88d4e3995df4aa4a477.tar.xz rust-openssl-f15c817c2d1fad288fe0f88d4e3995df4aa4a477.zip | |
Rustfmt
Diffstat (limited to 'openssl/src/stack.rs')
| -rw-r--r-- | openssl/src/stack.rs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/openssl/src/stack.rs b/openssl/src/stack.rs index ad208377..318791b8 100644 --- a/openssl/src/stack.rs +++ b/openssl/src/stack.rs @@ -10,8 +10,8 @@ use types::{OpenSslType, OpenSslTypeRef}; use util::Opaque; #[cfg(ossl10x)] -use ffi::{sk_pop as OPENSSL_sk_pop,sk_free as OPENSSL_sk_free, sk_num as OPENSSL_sk_num, - sk_value as OPENSSL_sk_value}; +use ffi::{sk_pop as OPENSSL_sk_pop, sk_free as OPENSSL_sk_free, sk_num as OPENSSL_sk_num, + sk_value as OPENSSL_sk_value}; #[cfg(ossl110)] use ffi::{OPENSSL_sk_pop, OPENSSL_sk_free, OPENSSL_sk_num, OPENSSL_sk_value}; @@ -226,7 +226,8 @@ 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 { + where T: 'a +{ stack: &'a StackRef<T>, pos: usize, } @@ -251,8 +252,7 @@ impl<'a, T: Stackable> iter::Iterator for Iter<'a, T> { } } -impl<'a, T: Stackable> iter::ExactSizeIterator for Iter<'a, T> { -} +impl<'a, T: Stackable> iter::ExactSizeIterator for Iter<'a, T> {} /// A mutable iterator over the stack's contents. pub struct IterMut<'a, T: Stackable + 'a> { @@ -272,9 +272,7 @@ impl<'a, T: Stackable> iter::Iterator for IterMut<'a, T> { // guarantee that we won't return several references to // the same object, so we have to use unsafe code for // mutable iterators. - let n = unsafe { - Some(T::Ref::from_ptr_mut(self.stack._get(self.pos))) - }; + let n = unsafe { Some(T::Ref::from_ptr_mut(self.stack._get(self.pos))) }; self.pos += 1; @@ -289,5 +287,4 @@ impl<'a, T: Stackable> iter::Iterator for IterMut<'a, T> { } } -impl<'a, T: Stackable> iter::ExactSizeIterator for IterMut<'a, T> { -} +impl<'a, T: Stackable> iter::ExactSizeIterator for IterMut<'a, T> {} |