Skip to content

Commit e612458

Browse files
authored
Remove mentions of 32-byte slice from tweak APIs
These methods accept `&Scalar`, not slice and `&Scalar` already guarantees 32-bytes, so this failure case is impossible.
1 parent a1ac3fb commit e612458

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/key.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,7 @@ impl SecretKey {
270270
///
271271
/// # Errors
272272
///
273-
/// Returns an error if the resulting key would be invalid or if the tweak was not a 32-byte
274-
/// length slice.
273+
/// Returns an error if the resulting key would be invalid.
275274
#[inline]
276275
pub fn add_tweak(mut self, tweak: &Scalar) -> Result<SecretKey, Error> {
277276
unsafe {
@@ -301,8 +300,7 @@ impl SecretKey {
301300
///
302301
/// # Errors
303302
///
304-
/// Returns an error if the resulting key would be invalid or if the tweak was not a 32-byte
305-
/// length slice.
303+
/// Returns an error if the resulting key would be invalid.
306304
#[inline]
307305
pub fn mul_tweak(mut self, tweak: &Scalar) -> Result<SecretKey, Error> {
308306
unsafe {
@@ -1255,7 +1253,7 @@ impl XOnlyPublicKey {
12551253
///
12561254
/// # Errors
12571255
///
1258-
/// If the resulting key would be invalid or if the tweak was not a 32-byte length slice.
1256+
/// If the resulting key would be invalid.
12591257
///
12601258
/// # Examples
12611259
///

0 commit comments

Comments
 (0)