@@ -198,7 +198,6 @@ impl SecretKey {
198
198
/// ```
199
199
#[ inline]
200
200
#[ cfg( feature = "rand" ) ]
201
- #[ cfg_attr( docsrs, doc( cfg( feature = "rand" ) ) ) ]
202
201
pub fn new < R : rand:: Rng + ?Sized > ( rng : & mut R ) -> SecretKey {
203
202
let mut data = crate :: random_32_bytes ( rng) ;
204
203
unsafe {
@@ -286,7 +285,6 @@ impl SecretKey {
286
285
/// # }
287
286
/// ```
288
287
#[ cfg( feature = "bitcoin_hashes" ) ]
289
- #[ cfg_attr( docsrs, doc( cfg( feature = "bitcoin-hashes" ) ) ) ]
290
288
#[ inline]
291
289
pub fn from_hashed_data < H : ThirtyTwoByteHash + hashes:: Hash > ( data : & [ u8 ] ) -> Self {
292
290
<H as hashes:: Hash >:: hash ( data) . into ( )
@@ -355,7 +353,6 @@ impl SecretKey {
355
353
/// Constructs an ECDSA signature for `msg` using the global [`SECP256K1`] context.
356
354
#[ inline]
357
355
#[ cfg( feature = "global-context" ) ]
358
- #[ cfg_attr( docsrs, doc( cfg( feature = "global-context" ) ) ) ]
359
356
pub fn sign_ecdsa ( & self , msg : Message ) -> ecdsa:: Signature { SECP256K1 . sign_ecdsa ( & msg, self ) }
360
357
361
358
/// Returns the [`KeyPair`] for this [`SecretKey`].
@@ -393,7 +390,6 @@ impl<T: ThirtyTwoByteHash> From<T> for SecretKey {
393
390
}
394
391
395
392
#[ cfg( feature = "serde" ) ]
396
- #[ cfg_attr( docsrs, doc( cfg( feature = "serde" ) ) ) ]
397
393
impl serde:: Serialize for SecretKey {
398
394
fn serialize < S : serde:: Serializer > ( & self , s : S ) -> Result < S :: Ok , S :: Error > {
399
395
if s. is_human_readable ( ) {
@@ -410,7 +406,6 @@ impl serde::Serialize for SecretKey {
410
406
}
411
407
412
408
#[ cfg( feature = "serde" ) ]
413
- #[ cfg_attr( docsrs, doc( cfg( feature = "serde" ) ) ) ]
414
409
impl < ' de > serde:: Deserialize < ' de > for SecretKey {
415
410
fn deserialize < D : serde:: Deserializer < ' de > > ( d : D ) -> Result < Self , D :: Error > {
416
411
if d. is_human_readable ( ) {
@@ -469,7 +464,6 @@ impl PublicKey {
469
464
/// Creates a new public key from a [`SecretKey`] and the global [`SECP256K1`] context.
470
465
#[ inline]
471
466
#[ cfg( feature = "global-context" ) ]
472
- #[ cfg_attr( docsrs, doc( cfg( feature = "global-context" ) ) ) ]
473
467
pub fn from_secret_key_global ( sk : & SecretKey ) -> PublicKey {
474
468
PublicKey :: from_secret_key ( SECP256K1 , sk)
475
469
}
@@ -740,7 +734,6 @@ impl From<ffi::PublicKey> for PublicKey {
740
734
}
741
735
742
736
#[ cfg( feature = "serde" ) ]
743
- #[ cfg_attr( docsrs, doc( cfg( feature = "serde" ) ) ) ]
744
737
impl serde:: Serialize for PublicKey {
745
738
fn serialize < S : serde:: Serializer > ( & self , s : S ) -> Result < S :: Ok , S :: Error > {
746
739
if s. is_human_readable ( ) {
@@ -757,7 +750,6 @@ impl serde::Serialize for PublicKey {
757
750
}
758
751
759
752
#[ cfg( feature = "serde" ) ]
760
- #[ cfg_attr( docsrs, doc( cfg( feature = "serde" ) ) ) ]
761
753
impl < ' de > serde:: Deserialize < ' de > for PublicKey {
762
754
fn deserialize < D : serde:: Deserializer < ' de > > ( d : D ) -> Result < PublicKey , D :: Error > {
763
755
if d. is_human_readable ( ) {
@@ -877,7 +869,6 @@ impl KeyPair {
877
869
/// [`Error::InvalidSecretKey`] if corresponding public key for the provided secret key is not even.
878
870
#[ inline]
879
871
#[ cfg( feature = "global-context" ) ]
880
- #[ cfg_attr( docsrs, doc( cfg( feature = "global-context" ) ) ) ]
881
872
pub fn from_seckey_str_global ( s : & str ) -> Result < KeyPair , Error > {
882
873
KeyPair :: from_seckey_str ( SECP256K1 , s)
883
874
}
@@ -895,7 +886,6 @@ impl KeyPair {
895
886
/// ```
896
887
#[ inline]
897
888
#[ cfg( feature = "rand" ) ]
898
- #[ cfg_attr( docsrs, doc( cfg( feature = "rand" ) ) ) ]
899
889
pub fn new < R : rand:: Rng + ?Sized , C : Signing > ( secp : & Secp256k1 < C > , rng : & mut R ) -> KeyPair {
900
890
let mut data = crate :: random_32_bytes ( rng) ;
901
891
unsafe {
@@ -912,7 +902,6 @@ impl KeyPair {
912
902
/// Generates a new random secret key using the global [`SECP256K1`] context.
913
903
#[ inline]
914
904
#[ cfg( all( feature = "global-context" , feature = "rand" ) ) ]
915
- #[ cfg_attr( docsrs, doc( cfg( all( feature = "global-context" , feature = "rand" ) ) ) ) ]
916
905
pub fn new_global < R : :: rand:: Rng + ?Sized > ( rng : & mut R ) -> KeyPair {
917
906
KeyPair :: new ( SECP256K1 , rng)
918
907
}
@@ -989,7 +978,6 @@ impl KeyPair {
989
978
/// Constructs an schnorr signature for `msg` using the global [`SECP256K1`] context.
990
979
#[ inline]
991
980
#[ cfg( all( feature = "global-context" , feature = "rand-std" ) ) ]
992
- #[ cfg_attr( docsrs, doc( cfg( all( feature = "global-context" , feature = "rand-std" ) ) ) ) ]
993
981
pub fn sign_schnorr ( & self , msg : Message ) -> schnorr:: Signature {
994
982
SECP256K1 . sign_schnorr ( & msg, self )
995
983
}
@@ -1044,7 +1032,6 @@ impl str::FromStr for KeyPair {
1044
1032
}
1045
1033
1046
1034
#[ cfg( feature = "serde" ) ]
1047
- #[ cfg_attr( docsrs, doc( cfg( feature = "serde" ) ) ) ]
1048
1035
impl serde:: Serialize for KeyPair {
1049
1036
fn serialize < S : serde:: Serializer > ( & self , s : S ) -> Result < S :: Ok , S :: Error > {
1050
1037
if s. is_human_readable ( ) {
@@ -1064,7 +1051,6 @@ impl serde::Serialize for KeyPair {
1064
1051
}
1065
1052
1066
1053
#[ cfg( feature = "serde" ) ]
1067
- #[ cfg_attr( docsrs, doc( cfg( feature = "serde" ) ) ) ]
1068
1054
impl < ' de > serde:: Deserialize < ' de > for KeyPair {
1069
1055
fn deserialize < D : serde:: Deserializer < ' de > > ( d : D ) -> Result < Self , D :: Error > {
1070
1056
if d. is_human_readable ( ) {
@@ -1439,7 +1425,6 @@ impl fmt::Display for InvalidParityValue {
1439
1425
}
1440
1426
1441
1427
#[ cfg( feature = "std" ) ]
1442
- #[ cfg_attr( docsrs, doc( cfg( feature = "std" ) ) ) ]
1443
1428
impl std:: error:: Error for InvalidParityValue { }
1444
1429
1445
1430
impl From < InvalidParityValue > for Error {
@@ -1448,7 +1433,6 @@ impl From<InvalidParityValue> for Error {
1448
1433
1449
1434
/// The parity is serialized as `u8` - `0` for even, `1` for odd.
1450
1435
#[ cfg( feature = "serde" ) ]
1451
- #[ cfg_attr( docsrs, doc( cfg( feature = "serde" ) ) ) ]
1452
1436
impl serde:: Serialize for Parity {
1453
1437
fn serialize < S : serde:: Serializer > ( & self , s : S ) -> Result < S :: Ok , S :: Error > {
1454
1438
s. serialize_u8 ( self . to_u8 ( ) )
@@ -1457,7 +1441,6 @@ impl serde::Serialize for Parity {
1457
1441
1458
1442
/// The parity is deserialized as `u8` - `0` for even, `1` for odd.
1459
1443
#[ cfg( feature = "serde" ) ]
1460
- #[ cfg_attr( docsrs, doc( cfg( feature = "serde" ) ) ) ]
1461
1444
impl < ' de > serde:: Deserialize < ' de > for Parity {
1462
1445
fn deserialize < D : serde:: Deserializer < ' de > > ( d : D ) -> Result < Self , D :: Error > {
1463
1446
struct Visitor ;
@@ -1516,7 +1499,6 @@ impl From<PublicKey> for XOnlyPublicKey {
1516
1499
}
1517
1500
1518
1501
#[ cfg( feature = "serde" ) ]
1519
- #[ cfg_attr( docsrs, doc( cfg( feature = "serde" ) ) ) ]
1520
1502
impl serde:: Serialize for XOnlyPublicKey {
1521
1503
fn serialize < S : serde:: Serializer > ( & self , s : S ) -> Result < S :: Ok , S :: Error > {
1522
1504
if s. is_human_readable ( ) {
@@ -1532,7 +1514,6 @@ impl serde::Serialize for XOnlyPublicKey {
1532
1514
}
1533
1515
1534
1516
#[ cfg( feature = "serde" ) ]
1535
- #[ cfg_attr( docsrs, doc( cfg( feature = "serde" ) ) ) ]
1536
1517
impl < ' de > serde:: Deserialize < ' de > for XOnlyPublicKey {
1537
1518
fn deserialize < D : serde:: Deserializer < ' de > > ( d : D ) -> Result < Self , D :: Error > {
1538
1519
if d. is_human_readable ( ) {
0 commit comments