@@ -30,13 +30,13 @@ use crate::{
30
30
///
31
31
/// We have attempted to reduce the side channel attack surface by implementing a constant time `eq`
32
32
/// method. For similar reasons we explicitly do not implement `PartialOrd`, `Ord`, or `Hash` on
33
- /// `SecretKey`. If you really want to order secrets keys then you can use `AsRef` to get at the
33
+ /// `SecretKey`. If you really want to order secret keys then you can use `AsRef` to get at the
34
34
/// underlying bytes and compare them - however this is almost certainly a bad idea.
35
35
///
36
36
/// # Serde support
37
37
///
38
38
/// Implements de/serialization with the `serde` feature enabled. We treat the byte value as a tuple
39
- /// of 32 `u8`s for non-human-readable formats. This representation is optimal for for some formats
39
+ /// of 32 `u8`s for non-human-readable formats. This representation is optimal for some formats
40
40
/// (e.g. [`bincode`]) however other formats may be less optimal (e.g. [`cbor`]).
41
41
///
42
42
/// # Examples
@@ -126,7 +126,7 @@ impl str::FromStr for SecretKey {
126
126
/// # Serde support
127
127
///
128
128
/// Implements de/serialization with the `serde` feature enabled. We treat the byte value as a tuple
129
- /// of 33 `u8`s for non-human-readable formats. This representation is optimal for for some formats
129
+ /// of 33 `u8`s for non-human-readable formats. This representation is optimal for some formats
130
130
/// (e.g. [`bincode`]) however other formats may be less optimal (e.g. [`cbor`]).
131
131
///
132
132
/// # Examples
@@ -358,7 +358,7 @@ impl SecretKey {
358
358
PublicKey :: from_secret_key ( secp, self )
359
359
}
360
360
361
- /// Returns the [`XOnlyPublicKey`] (and it's [`Parity`]) for this [`SecretKey`].
361
+ /// Returns the [`XOnlyPublicKey`] (and its [`Parity`]) for this [`SecretKey`].
362
362
///
363
363
/// This is equivalent to `XOnlyPublicKey::from_keypair(self.keypair(secp))`.
364
364
#[ inline]
@@ -715,7 +715,7 @@ impl PublicKey {
715
715
}
716
716
}
717
717
718
- /// Returns the [`XOnlyPublicKey`] (and it's [`Parity`]) for this [`PublicKey`].
718
+ /// Returns the [`XOnlyPublicKey`] (and its [`Parity`]) for this [`PublicKey`].
719
719
#[ inline]
720
720
pub fn x_only_public_key ( & self ) -> ( XOnlyPublicKey , Parity ) {
721
721
let mut pk_parity = 0 ;
@@ -803,9 +803,9 @@ impl<'de> serde::Deserialize<'de> for PublicKey {
803
803
///
804
804
/// # Serde support
805
805
///
806
- /// Implements de/serialization with the `serde` and_ `global-context` features enabled. Serializes
806
+ /// Implements de/serialization with the `serde` and `global-context` features enabled. Serializes
807
807
/// the secret bytes only. We treat the byte value as a tuple of 32 `u8`s for non-human-readable
808
- /// formats. This representation is optimal for for some formats (e.g. [`bincode`]) however other
808
+ /// formats. This representation is optimal for some formats (e.g. [`bincode`]) however other
809
809
/// formats may be less optimal (e.g. [`cbor`]). For human-readable formats we use a hex string.
810
810
///
811
811
/// # Examples
@@ -905,7 +905,7 @@ impl Keypair {
905
905
Keypair :: from_seckey_str ( SECP256K1 , s)
906
906
}
907
907
908
- /// Generates a new random secret key.
908
+ /// Generates a new random key pair .
909
909
/// # Examples
910
910
///
911
911
/// ```
@@ -999,15 +999,15 @@ impl Keypair {
999
999
#[ inline]
1000
1000
pub fn public_key ( & self ) -> PublicKey { PublicKey :: from_keypair ( self ) }
1001
1001
1002
- /// Returns the [`XOnlyPublicKey`] (and it's [`Parity`]) for this [`Keypair`].
1002
+ /// Returns the [`XOnlyPublicKey`] (and its [`Parity`]) for this [`Keypair`].
1003
1003
///
1004
1004
/// This is equivalent to using [`XOnlyPublicKey::from_keypair`].
1005
1005
#[ inline]
1006
1006
pub fn x_only_public_key ( & self ) -> ( XOnlyPublicKey , Parity ) {
1007
1007
XOnlyPublicKey :: from_keypair ( self )
1008
1008
}
1009
1009
1010
- /// Constructs an schnorr signature for `msg` using the global [`SECP256K1`] context.
1010
+ /// Constructs a schnorr signature for `msg` using the global [`SECP256K1`] context.
1011
1011
#[ inline]
1012
1012
#[ cfg( all( feature = "global-context" , feature = "rand" , feature = "std" ) ) ]
1013
1013
pub fn sign_schnorr ( & self , msg : & [ u8 ] ) -> schnorr:: Signature {
@@ -1126,7 +1126,7 @@ impl CPtr for Keypair {
1126
1126
/// # Serde support
1127
1127
///
1128
1128
/// Implements de/serialization with the `serde` feature enabled. We treat the byte value as a tuple
1129
- /// of 32 `u8`s for non-human-readable formats. This representation is optimal for for some formats
1129
+ /// of 32 `u8`s for non-human-readable formats. This representation is optimal for some formats
1130
1130
/// (e.g. [`bincode`]) however other formats may be less optimal (e.g. [`cbor`]).
1131
1131
///
1132
1132
/// # Examples
@@ -1191,7 +1191,7 @@ impl XOnlyPublicKey {
1191
1191
) ]
1192
1192
pub fn as_mut_ptr ( & mut self ) -> * mut ffi:: XOnlyPublicKey { self . as_mut_c_ptr ( ) }
1193
1193
1194
- /// Returns the [`XOnlyPublicKey`] (and it's [`Parity`]) for `keypair`.
1194
+ /// Returns the [`XOnlyPublicKey`] (and its [`Parity`]) for `keypair`.
1195
1195
#[ inline]
1196
1196
pub fn from_keypair ( keypair : & Keypair ) -> ( XOnlyPublicKey , Parity ) {
1197
1197
let mut pk_parity = 0 ;
0 commit comments