diff options
author | Steven Fackler <sfackler@gmail.com> | 2017-07-15 21:46:11 -0700 |
---|---|---|
committer | Steven Fackler <sfackler@gmail.com> | 2017-07-15 21:46:11 -0700 |
commit | bcd0dcafcba31b7239faf1d582871f8fa83d69e9 (patch) | |
tree | f090be453d289f0f17ca4f6a3f458881e6f7091a /openssl/src/stack.rs | |
parent | 5c2410c38af8ed2ee041081da84cd61dadc22e12 (diff) | |
download | rust-openssl-bcd0dcafcba31b7239faf1d582871f8fa83d69e9.zip |
Rustfmt
Diffstat (limited to 'openssl/src/stack.rs')
-rw-r--r-- | openssl/src/stack.rs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/openssl/src/stack.rs b/openssl/src/stack.rs index 6ac8264c..f869bdb4 100644 --- a/openssl/src/stack.rs +++ b/openssl/src/stack.rs @@ -86,8 +86,11 @@ impl<T: Stackable> ForeignType for Stack<T> { #[inline] unsafe fn from_ptr(ptr: *mut T::StackType) -> Stack<T> { - assert!(!ptr.is_null(), "Must not instantiate a Stack from a null-ptr - use Stack::new() in \ - that case"); + assert!( + !ptr.is_null(), + "Must not instantiate a Stack from a null-ptr - use Stack::new() in \ + that case" + ); Stack(ptr) } @@ -217,7 +220,9 @@ impl<T: Stackable> StackRef<T> { /// Pushes a value onto the top of the stack. pub fn push(&mut self, data: T) -> Result<(), ErrorStack> { unsafe { - try!(cvt(OPENSSL_sk_push(self.as_stack(), data.as_ptr() as *mut _))); + try!(cvt( + OPENSSL_sk_push(self.as_stack(), data.as_ptr() as *mut _), + )); mem::forget(data); Ok(()) } @@ -292,7 +297,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, |