summaryrefslogtreecommitdiff
path: root/openssl/src/stack.rs
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2017-07-15 21:46:11 -0700
committerSteven Fackler <sfackler@gmail.com>2017-07-15 21:46:11 -0700
commitbcd0dcafcba31b7239faf1d582871f8fa83d69e9 (patch)
treef090be453d289f0f17ca4f6a3f458881e6f7091a /openssl/src/stack.rs
parent5c2410c38af8ed2ee041081da84cd61dadc22e12 (diff)
downloadrust-openssl-bcd0dcafcba31b7239faf1d582871f8fa83d69e9.zip
Rustfmt
Diffstat (limited to 'openssl/src/stack.rs')
-rw-r--r--openssl/src/stack.rs14
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,