Minor documentation fixes

This commit is contained in:
Andrew Poelstra 2015-10-09 11:39:42 -05:00
parent 2748dae7eb
commit ec0e8407f2
4 changed files with 7 additions and 4 deletions

View File

@ -13,7 +13,8 @@
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. // If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
// //
//! Constants //! # Constants
//! Constants related to the API and the underlying curve
/// The size (in bytes) of a message /// The size (in bytes) of a message
pub const MESSAGE_SIZE: usize = 32; pub const MESSAGE_SIZE: usize = 32;

View File

@ -13,7 +13,9 @@
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. // If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
// //
//! FFI bindings //! # FFI bindings
//! Direct bindings to the underlying C library functions. These should
//! not be needed for most users.
use std::mem; use std::mem;
use libc::{c_int, c_uchar, c_uint, c_void, size_t}; use libc::{c_int, c_uchar, c_uint, c_void, size_t};

View File

@ -13,7 +13,7 @@
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. // If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
// //
//! Public/Private keys //! # Public and secret keys
use std::intrinsics::copy_nonoverlapping; use std::intrinsics::copy_nonoverlapping;
use std::marker; use std::marker;

View File

@ -182,7 +182,7 @@ impl_array_newtype!(Message, u8, constants::MESSAGE_SIZE);
impl_pretty_debug!(Message); impl_pretty_debug!(Message);
impl Message { impl Message {
/// Converts a `MESSAGE_SIZE`-byte slice to a nonce /// Converts a `MESSAGE_SIZE`-byte slice to a message object
#[inline] #[inline]
pub fn from_slice(data: &[u8]) -> Result<Message, Error> { pub fn from_slice(data: &[u8]) -> Result<Message, Error> {
match data.len() { match data.len() {