Skip to content

Commit 6741aa0

Browse files
committed
Merge #472: Remove unnecessary instances of must_use
d2c97d4 Remove unnecessary instances of must_use (Tobin C. Harding) Pull request description: `Result` is already `must_use`, adding the compiler directive to functions that return `Result` is unnecessary. ACKs for top commit: apoelstra: ACK d2c97d4 Tree-SHA512: 2c9cf38ea1b5b9f9502a99b8840cdc1e5969d07b0bfd284b2abc5f68dfe6dd501a9ce3371572256d2284b4ddcdd86770d760c8e482fbf88646c0e04a43493b65
2 parents 3f99ae8 + d2c97d4 commit 6741aa0

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/key.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ impl SecretKey {
273273
///
274274
/// Returns an error if the resulting key would be invalid.
275275
#[inline]
276-
#[must_use = "you forgot to use the tweaked secret key"]
277276
pub fn add_tweak(mut self, tweak: &Scalar) -> Result<SecretKey, Error> {
278277
unsafe {
279278
if ffi::secp256k1_ec_seckey_tweak_add(
@@ -304,7 +303,6 @@ impl SecretKey {
304303
///
305304
/// Returns an error if the resulting key would be invalid.
306305
#[inline]
307-
#[must_use = "you forgot to use the tweaked secret key"]
308306
pub fn mul_tweak(mut self, tweak: &Scalar) -> Result<SecretKey, Error> {
309307
unsafe {
310308
if ffi::secp256k1_ec_seckey_tweak_mul(
@@ -570,7 +568,6 @@ impl PublicKey {
570568
///
571569
/// Returns an error if the resulting key would be invalid.
572570
#[inline]
573-
#[must_use = "you forgot to use the tweaked public key"]
574571
pub fn add_exp_tweak<C: Verification>(
575572
mut self,
576573
secp: &Secp256k1<C>,
@@ -607,7 +604,6 @@ impl PublicKey {
607604
///
608605
/// Returns an error if the resulting key would be invalid.
609606
#[inline]
610-
#[must_use = "you forgot to use the tweaked public key"]
611607
pub fn mul_tweak<C: Verification>(
612608
mut self,
613609
secp: &Secp256k1<C>,
@@ -977,7 +973,6 @@ impl KeyPair {
977973
/// ```
978974
// TODO: Add checked implementation
979975
#[inline]
980-
#[must_use = "you forgot to use the tweaked key pair"]
981976
pub fn add_xonly_tweak<C: Verification>(
982977
mut self,
983978
secp: &Secp256k1<C>,
@@ -1277,7 +1272,6 @@ impl XOnlyPublicKey {
12771272
/// let tweaked = xonly.add_tweak(&secp, &tweak).expect("Improbable to fail with a randomly generated tweak");
12781273
/// # }
12791274
/// ```
1280-
#[must_use = "you forgot to use the tweaked xonly pubkey"]
12811275
pub fn add_tweak<V: Verification>(
12821276
mut self,
12831277
secp: &Secp256k1<V>,

0 commit comments

Comments
 (0)