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.
This commit is contained in:
Martin Habovštiak 2022-06-21 18:37:35 +02:00 committed by GitHub
parent a1ac3fb311
commit e612458dc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -270,8 +270,7 @@ impl SecretKey {
/// ///
/// # Errors /// # Errors
/// ///
/// Returns an error if the resulting key would be invalid or if the tweak was not a 32-byte /// Returns an error if the resulting key would be invalid.
/// length slice.
#[inline] #[inline]
pub fn add_tweak(mut self, tweak: &Scalar) -> Result<SecretKey, Error> { pub fn add_tweak(mut self, tweak: &Scalar) -> Result<SecretKey, Error> {
unsafe { unsafe {
@ -301,8 +300,7 @@ impl SecretKey {
/// ///
/// # Errors /// # Errors
/// ///
/// Returns an error if the resulting key would be invalid or if the tweak was not a 32-byte /// Returns an error if the resulting key would be invalid.
/// length slice.
#[inline] #[inline]
pub fn mul_tweak(mut self, tweak: &Scalar) -> Result<SecretKey, Error> { pub fn mul_tweak(mut self, tweak: &Scalar) -> Result<SecretKey, Error> {
unsafe { unsafe {
@ -1255,7 +1253,7 @@ impl XOnlyPublicKey {
/// ///
/// # Errors /// # Errors
/// ///
/// If the resulting key would be invalid or if the tweak was not a 32-byte length slice. /// If the resulting key would be invalid.
/// ///
/// # Examples /// # Examples
/// ///