Skip to content

Commit

Permalink
Put compiler attributes below rustdocs
Browse files Browse the repository at this point in the history
It is conventional, at least within the `rust-bitcoin` organisation to
put compiler attributes _below_ the associated rustdocs.
  • Loading branch information
tcharding committed Jun 28, 2022
1 parent e8454cd commit 5b86e38
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions secp256k1-sys/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}

Expand Down

0 comments on commit 5b86e38

Please sign in to comment.