Skip to content

Commit 1c17d0f

Browse files
committed
Improve docs on impl_array_newtype
Improve the rustdocs on the `impl_array_newtype` macro by adding full stops and re-writing the outer comment.
1 parent 91ac518 commit 1c17d0f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

secp256k1-sys/src/macros.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,32 @@
1313
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
1414
//
1515

16-
// This is a macro that routinely comes in handy
16+
/// Implement methods and traits for types that contain an inner array.
1717
#[macro_export]
1818
macro_rules! impl_array_newtype {
1919
($thing:ident, $ty:ty, $len:expr) => {
2020
impl Copy for $thing {}
2121

2222
impl $thing {
23-
/// Converts the object to a raw pointer for FFI interfacing
23+
/// Converts the object to a raw pointer for FFI interfacing.
2424
#[inline]
2525
pub fn as_ptr(&self) -> *const $ty {
2626
let &$thing(ref dat) = self;
2727
dat.as_ptr()
2828
}
2929

30-
/// Converts the object to a mutable raw pointer for FFI interfacing
30+
/// Converts the object to a mutable raw pointer for FFI interfacing.
3131
#[inline]
3232
pub fn as_mut_ptr(&mut self) -> *mut $ty {
3333
let &mut $thing(ref mut dat) = self;
3434
dat.as_mut_ptr()
3535
}
3636

37-
/// Returns the length of the object as an array
37+
/// Returns the length of the object as an array.
3838
#[inline]
3939
pub fn len(&self) -> usize { $len }
4040

41-
/// Returns whether the object as an array is empty
41+
/// Returns whether the object as an array is empty.
4242
#[inline]
4343
pub fn is_empty(&self) -> bool { false }
4444
}

0 commit comments

Comments
 (0)