From 5b86e38aea14f5f2881bfd2c12f0446a5b38ffec Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 28 Jun 2022 13:07:08 +1000 Subject: [PATCH] Put compiler attributes below rustdocs It is conventional, at least within the `rust-bitcoin` organisation to put compiler attributes _below_ the associated rustdocs. --- secp256k1-sys/src/macros.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/secp256k1-sys/src/macros.rs b/secp256k1-sys/src/macros.rs index 10d715e32..1089e7985 100644 --- a/secp256k1-sys/src/macros.rs +++ b/secp256k1-sys/src/macros.rs @@ -20,26 +20,26 @@ macro_rules! impl_array_newtype { impl Copy for $thing {} impl $thing { - #[inline] /// Converts the object to a raw pointer for FFI interfacing + #[inline] pub fn as_ptr(&self) -> *const $ty { let &$thing(ref dat) = self; dat.as_ptr() } - #[inline] /// Converts the object to a mutable raw pointer for FFI interfacing + #[inline] pub fn as_mut_ptr(&mut self) -> *mut $ty { let &mut $thing(ref mut dat) = self; dat.as_mut_ptr() } - #[inline] /// Returns the length of the object as an array + #[inline] pub fn len(&self) -> usize { $len } - #[inline] /// Returns whether the object as an array is empty + #[inline] pub fn is_empty(&self) -> bool { false } }