From d2c97d43d8f51290f8933cb4e0c8d036d9f47d42 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 11 Jul 2022 07:56:47 +1000 Subject: [PATCH] Remove unnecessary instances of must_use `Result` is already `must_use`, adding the compiler directive to functions that return `Result` is unnecessary. --- src/key.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/key.rs b/src/key.rs index e38f4aa..9971f0c 100644 --- a/src/key.rs +++ b/src/key.rs @@ -273,7 +273,6 @@ impl SecretKey { /// /// Returns an error if the resulting key would be invalid. #[inline] - #[must_use = "you forgot to use the tweaked secret key"] pub fn add_tweak(mut self, tweak: &Scalar) -> Result { unsafe { if ffi::secp256k1_ec_seckey_tweak_add( @@ -304,7 +303,6 @@ impl SecretKey { /// /// Returns an error if the resulting key would be invalid. #[inline] - #[must_use = "you forgot to use the tweaked secret key"] pub fn mul_tweak(mut self, tweak: &Scalar) -> Result { unsafe { if ffi::secp256k1_ec_seckey_tweak_mul( @@ -570,7 +568,6 @@ impl PublicKey { /// /// Returns an error if the resulting key would be invalid. #[inline] - #[must_use = "you forgot to use the tweaked public key"] pub fn add_exp_tweak( mut self, secp: &Secp256k1, @@ -607,7 +604,6 @@ impl PublicKey { /// /// Returns an error if the resulting key would be invalid. #[inline] - #[must_use = "you forgot to use the tweaked public key"] pub fn mul_tweak( mut self, secp: &Secp256k1, @@ -977,7 +973,6 @@ impl KeyPair { /// ``` // TODO: Add checked implementation #[inline] - #[must_use = "you forgot to use the tweaked key pair"] pub fn add_xonly_tweak( mut self, secp: &Secp256k1, @@ -1277,7 +1272,6 @@ impl XOnlyPublicKey { /// let tweaked = xonly.add_tweak(&secp, &tweak).expect("Improbable to fail with a randomly generated tweak"); /// # } /// ``` - #[must_use = "you forgot to use the tweaked xonly pubkey"] pub fn add_tweak( mut self, secp: &Secp256k1,