schnorr: Improve rustdocs

Improve the rustdocs in the `schnorr` module by doing:

- Use third person tense
- Add full stops
- Use links and code ticks
This commit is contained in:
Tobin C. Harding 2022-11-24 11:19:12 +11:00
parent 47f19a78ef
commit e945751d85
1 changed files with 6 additions and 6 deletions

View File

@ -73,7 +73,7 @@ impl str::FromStr for Signature {
}
impl Signature {
/// Creates a Signature directly from a slice
/// Creates a `Signature` directly from a slice.
#[inline]
pub fn from_slice(data: &[u8]) -> Result<Signature, Error> {
match data.len() {
@ -119,7 +119,7 @@ impl<C: Signing> Secp256k1<C> {
}
}
/// Create a schnorr signature internally using the ThreadRng random number
/// Creates a schnorr signature internally using the [`rand::rngs::ThreadRng`] random number
/// generator to generate the auxiliary random data.
#[cfg(feature = "rand-std")]
#[cfg_attr(docsrs, doc(cfg(feature = "rand-std")))]
@ -127,12 +127,12 @@ impl<C: Signing> Secp256k1<C> {
self.sign_schnorr_with_rng(msg, keypair, &mut rand::thread_rng())
}
/// Create a schnorr signature without using any auxiliary random data.
/// Creates a schnorr signature without using any auxiliary random data.
pub fn sign_schnorr_no_aux_rand(&self, msg: &Message, keypair: &KeyPair) -> Signature {
self.sign_schnorr_helper(msg, keypair, ptr::null())
}
/// Create a schnorr signature using the given auxiliary random data.
/// Creates a schnorr signature using the given auxiliary random data.
pub fn sign_schnorr_with_aux_rand(
&self,
msg: &Message,
@ -142,7 +142,7 @@ impl<C: Signing> Secp256k1<C> {
self.sign_schnorr_helper(msg, keypair, aux_rand.as_c_ptr() as *const ffi::types::c_uchar)
}
/// Create a schnorr signature using the given random number generator to
/// Creates a schnorr signature using the given random number generator to
/// generate the auxiliary random data.
#[cfg(feature = "rand")]
#[cfg_attr(docsrs, doc(cfg(feature = "rand")))]
@ -159,7 +159,7 @@ impl<C: Signing> Secp256k1<C> {
}
impl<C: Verification> Secp256k1<C> {
/// Verify a schnorr signature.
/// Verifies a schnorr signature.
pub fn verify_schnorr(
&self,
sig: &Signature,