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:
parent
da8b1b5439
commit
23ee0930c7
26
src/lib.rs
26
src/lib.rs
|
@ -59,32 +59,18 @@ extern crate test;
|
||||||
#[cfg(feature = "no-std")]
|
#[cfg(feature = "no-std")]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate alloc;
|
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 use bitcoin_hashes as hashes;
|
||||||
pub extern crate bech32;
|
pub use secp256k1;
|
||||||
pub extern crate secp256k1;
|
pub use bech32;
|
||||||
|
|
||||||
#[cfg(feature = "no-std")]
|
|
||||||
extern crate hashbrown;
|
|
||||||
|
|
||||||
#[cfg(feature = "base64")]
|
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "base64")))]
|
|
||||||
pub extern crate base64;
|
|
||||||
|
|
||||||
#[cfg(feature="bitcoinconsensus")]
|
#[cfg(feature="bitcoinconsensus")]
|
||||||
extern crate bitcoinconsensus;
|
pub use bitcoinconsensus;
|
||||||
|
|
||||||
#[cfg(feature = "serde")]
|
#[cfg(feature = "serde")]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate actual_serde as serde;
|
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)]
|
#[cfg(test)]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
|
Loading…
Reference in New Issue