Skip to content

Commit e945751

Browse files
committed
schnorr: Improve rustdocs
Improve the rustdocs in the `schnorr` module by doing: - Use third person tense - Add full stops - Use links and code ticks
1 parent 47f19a7 commit e945751

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/schnorr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl str::FromStr for Signature {
7373
}
7474

7575
impl Signature {
76-
/// Creates a Signature directly from a slice
76+
/// Creates a `Signature` directly from a slice.
7777
#[inline]
7878
pub fn from_slice(data: &[u8]) -> Result<Signature, Error> {
7979
match data.len() {
@@ -119,20 +119,20 @@ impl<C: Signing> Secp256k1<C> {
119119
}
120120
}
121121

122-
/// Create a schnorr signature internally using the ThreadRng random number
122+
/// Creates a schnorr signature internally using the [`rand::rngs::ThreadRng`] random number
123123
/// generator to generate the auxiliary random data.
124124
#[cfg(feature = "rand-std")]
125125
#[cfg_attr(docsrs, doc(cfg(feature = "rand-std")))]
126126
pub fn sign_schnorr(&self, msg: &Message, keypair: &KeyPair) -> Signature {
127127
self.sign_schnorr_with_rng(msg, keypair, &mut rand::thread_rng())
128128
}
129129

130-
/// Create a schnorr signature without using any auxiliary random data.
130+
/// Creates a schnorr signature without using any auxiliary random data.
131131
pub fn sign_schnorr_no_aux_rand(&self, msg: &Message, keypair: &KeyPair) -> Signature {
132132
self.sign_schnorr_helper(msg, keypair, ptr::null())
133133
}
134134

135-
/// Create a schnorr signature using the given auxiliary random data.
135+
/// Creates a schnorr signature using the given auxiliary random data.
136136
pub fn sign_schnorr_with_aux_rand(
137137
&self,
138138
msg: &Message,
@@ -142,7 +142,7 @@ impl<C: Signing> Secp256k1<C> {
142142
self.sign_schnorr_helper(msg, keypair, aux_rand.as_c_ptr() as *const ffi::types::c_uchar)
143143
}
144144

145-
/// Create a schnorr signature using the given random number generator to
145+
/// Creates a schnorr signature using the given random number generator to
146146
/// generate the auxiliary random data.
147147
#[cfg(feature = "rand")]
148148
#[cfg_attr(docsrs, doc(cfg(feature = "rand")))]
@@ -159,7 +159,7 @@ impl<C: Signing> Secp256k1<C> {
159159
}
160160

161161
impl<C: Verification> Secp256k1<C> {
162-
/// Verify a schnorr signature.
162+
/// Verifies a schnorr signature.
163163
pub fn verify_schnorr(
164164
&self,
165165
sig: &Signature,

0 commit comments

Comments
 (0)