From e612458dc73def68550c64c41ff8ab40c2976f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Habov=C5=A1tiak?= Date: Tue, 21 Jun 2022 18:37:35 +0200 Subject: [PATCH] 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. --- src/key.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/key.rs b/src/key.rs index 787859d..b862f19 100644 --- a/src/key.rs +++ b/src/key.rs @@ -270,8 +270,7 @@ impl SecretKey { /// /// # Errors /// - /// Returns an error if the resulting key would be invalid or if the tweak was not a 32-byte - /// length slice. + /// Returns an error if the resulting key would be invalid. #[inline] pub fn add_tweak(mut self, tweak: &Scalar) -> Result { unsafe { @@ -301,8 +300,7 @@ impl SecretKey { /// /// # Errors /// - /// Returns an error if the resulting key would be invalid or if the tweak was not a 32-byte - /// length slice. + /// Returns an error if the resulting key would be invalid. #[inline] pub fn mul_tweak(mut self, tweak: &Scalar) -> Result { unsafe { @@ -1255,7 +1253,7 @@ impl XOnlyPublicKey { /// /// # 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 ///