From: Arik Sosman Date: Thu, 15 Aug 2024 01:49:22 +0000 (-0700) Subject: Introduce io module. X-Git-Tag: v0.0.124-beta~9^2~9 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=b05113ab729f52282462bc3d4f84bddc98d766c2;p=rust-lightning 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. --- 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)]