Remove extern crate

Now we have edition 2018 we do not need to use `macro_use` or `extern
crate`; `pub use` works with macros. Notable exceptions are `alloc` and
`test`. Also leave the serde rename because touching it opens a can of
worms.
This commit is contained in:
Tobin C. Harding 2022-06-07 13:00:01 +10:00
parent da8b1b5439
commit 23ee0930c7
1 changed files with 6 additions and 20 deletions

View File

@ -59,32 +59,18 @@ extern crate test;
#[cfg(feature = "no-std")]
#[macro_use]
extern crate alloc;
#[cfg(feature = "no-std")]
extern crate core2;
// Re-exported dependencies.
// Re-export dependencies we control.
pub use bitcoin_hashes as hashes;
pub extern crate bech32;
pub extern crate secp256k1;
#[cfg(feature = "no-std")]
extern crate hashbrown;
#[cfg(feature = "base64")]
#[cfg_attr(docsrs, doc(cfg(feature = "base64")))]
pub extern crate base64;
pub use secp256k1;
pub use bech32;
#[cfg(feature="bitcoinconsensus")]
extern crate bitcoinconsensus;
pub use bitcoinconsensus;
#[cfg(feature = "serde")]
#[macro_use]
extern crate actual_serde as serde;
#[cfg(all(test, feature = "serde"))]
extern crate bincode;
#[cfg(all(test, feature = "serde"))]
extern crate serde_json;
#[cfg(all(test, feature = "serde"))]
extern crate serde_test;
#[cfg(test)]
#[macro_use]