Skip to content

Commit bb4972f

Browse files
committed
Merge #757: chore: fix doc typos for keys
e843bf5 chore: fix doc typos for keys (Tommy Volk) Pull request description: ACKs for top commit: tcharding: ACK e843bf5 storopoli: ACK e843bf5 apoelstra: ACK e843bf5; successfully ran local tests; thanks so much for this! Tree-SHA512: 395ef2e2399ad3de65c5a22ff8fe050ff680b7da8d9113d22b318656e0c5dcbd1ad7da05553d21bba94447bedf503f6c1e59d3ba3020f301a68734e633f2c760
2 parents ac7c74a + e843bf5 commit bb4972f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/key.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ use crate::{
3030
///
3131
/// We have attempted to reduce the side channel attack surface by implementing a constant time `eq`
3232
/// 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
3434
/// underlying bytes and compare them - however this is almost certainly a bad idea.
3535
///
3636
/// # Serde support
3737
///
3838
/// 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
4040
/// (e.g. [`bincode`]) however other formats may be less optimal (e.g. [`cbor`]).
4141
///
4242
/// # Examples
@@ -126,7 +126,7 @@ impl str::FromStr for SecretKey {
126126
/// # Serde support
127127
///
128128
/// 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
130130
/// (e.g. [`bincode`]) however other formats may be less optimal (e.g. [`cbor`]).
131131
///
132132
/// # Examples
@@ -358,7 +358,7 @@ impl SecretKey {
358358
PublicKey::from_secret_key(secp, self)
359359
}
360360

361-
/// Returns the [`XOnlyPublicKey`] (and it's [`Parity`]) for this [`SecretKey`].
361+
/// Returns the [`XOnlyPublicKey`] (and its [`Parity`]) for this [`SecretKey`].
362362
///
363363
/// This is equivalent to `XOnlyPublicKey::from_keypair(self.keypair(secp))`.
364364
#[inline]
@@ -715,7 +715,7 @@ impl PublicKey {
715715
}
716716
}
717717

718-
/// Returns the [`XOnlyPublicKey`] (and it's [`Parity`]) for this [`PublicKey`].
718+
/// Returns the [`XOnlyPublicKey`] (and its [`Parity`]) for this [`PublicKey`].
719719
#[inline]
720720
pub fn x_only_public_key(&self) -> (XOnlyPublicKey, Parity) {
721721
let mut pk_parity = 0;
@@ -803,9 +803,9 @@ impl<'de> serde::Deserialize<'de> for PublicKey {
803803
///
804804
/// # Serde support
805805
///
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
807807
/// 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
809809
/// formats may be less optimal (e.g. [`cbor`]). For human-readable formats we use a hex string.
810810
///
811811
/// # Examples
@@ -905,7 +905,7 @@ impl Keypair {
905905
Keypair::from_seckey_str(SECP256K1, s)
906906
}
907907

908-
/// Generates a new random secret key.
908+
/// Generates a new random key pair.
909909
/// # Examples
910910
///
911911
/// ```
@@ -999,15 +999,15 @@ impl Keypair {
999999
#[inline]
10001000
pub fn public_key(&self) -> PublicKey { PublicKey::from_keypair(self) }
10011001

1002-
/// Returns the [`XOnlyPublicKey`] (and it's [`Parity`]) for this [`Keypair`].
1002+
/// Returns the [`XOnlyPublicKey`] (and its [`Parity`]) for this [`Keypair`].
10031003
///
10041004
/// This is equivalent to using [`XOnlyPublicKey::from_keypair`].
10051005
#[inline]
10061006
pub fn x_only_public_key(&self) -> (XOnlyPublicKey, Parity) {
10071007
XOnlyPublicKey::from_keypair(self)
10081008
}
10091009

1010-
/// Constructs an schnorr signature for `msg` using the global [`SECP256K1`] context.
1010+
/// Constructs a schnorr signature for `msg` using the global [`SECP256K1`] context.
10111011
#[inline]
10121012
#[cfg(all(feature = "global-context", feature = "rand", feature = "std"))]
10131013
pub fn sign_schnorr(&self, msg: &[u8]) -> schnorr::Signature {
@@ -1126,7 +1126,7 @@ impl CPtr for Keypair {
11261126
/// # Serde support
11271127
///
11281128
/// 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
11301130
/// (e.g. [`bincode`]) however other formats may be less optimal (e.g. [`cbor`]).
11311131
///
11321132
/// # Examples
@@ -1191,7 +1191,7 @@ impl XOnlyPublicKey {
11911191
)]
11921192
pub fn as_mut_ptr(&mut self) -> *mut ffi::XOnlyPublicKey { self.as_mut_c_ptr() }
11931193

1194-
/// Returns the [`XOnlyPublicKey`] (and it's [`Parity`]) for `keypair`.
1194+
/// Returns the [`XOnlyPublicKey`] (and its [`Parity`]) for `keypair`.
11951195
#[inline]
11961196
pub fn from_keypair(keypair: &Keypair) -> (XOnlyPublicKey, Parity) {
11971197
let mut pk_parity = 0;

0 commit comments

Comments
 (0)