From b05113ab729f52282462bc3d4f84bddc98d766c2 Mon Sep 17 00:00:00 2001 From: Arik Sosman Date: Wed, 14 Aug 2024 18:49:22 -0700 Subject: [PATCH] Introduce io module. The rust-bitcoin upgrade will introduce `bitcoin::io` module, which will be missing a necessary subset of traits. To accommodate those traits' future implementations, we move the `lightning::io` module to its own file, where we will be able to implement the missing trait subset in the next commit. --- lightning/src/io/mod.rs | 6 ++++++ lightning/src/lib.rs | 8 ++------ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 lightning/src/io/mod.rs diff --git a/lightning/src/io/mod.rs b/lightning/src/io/mod.rs new file mode 100644 index 000000000..169885b4f --- /dev/null +++ b/lightning/src/io/mod.rs @@ -0,0 +1,6 @@ +#[cfg(not(feature = "std"))] +/// Re-export of either `core2::io` or `std::io`, depending on the `std` feature flag. +pub use core2::io::*; +#[cfg(feature = "std")] +/// Re-export of either `core2::io` or `std::io`, depending on the `std` feature flag. +pub use std::io::*; diff --git a/lightning/src/lib.rs b/lightning/src/lib.rs index d53f13743..fc860adaa 100644 --- a/lightning/src/lib.rs +++ b/lightning/src/lib.rs @@ -88,12 +88,8 @@ pub mod events; pub(crate) mod crypto; -#[cfg(feature = "std")] -/// Re-export of either `core2::io` or `std::io`, depending on the `std` feature flag. -pub use std::io; -#[cfg(not(feature = "std"))] -/// Re-export of either `core2::io` or `std::io`, depending on the `std` feature flag. -pub use core2::io; +/// Extension of the bitcoin::io module +pub mod io; #[cfg(not(feature = "std"))] #[doc(hidden)] -- 2.39.5