From bcd0dcafcba31b7239faf1d582871f8fa83d69e9 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sat, 15 Jul 2017 21:46:11 -0700 Subject: Rustfmt --- openssl/src/stack.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'openssl/src/stack.rs') 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 ForeignType for Stack { #[inline] unsafe fn from_ptr(ptr: *mut T::StackType) -> Stack { - 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 StackRef { /// 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 { /// An iterator over the stack's contents. pub struct Iter<'a, T: Stackable> - where T: 'a +where + T: 'a, { stack: &'a StackRef, pos: usize, -- cgit v1.2.3