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.
This commit is contained in:
Arik Sosman 2024-08-14 18:49:22 -07:00
parent fb818e09a0
commit b05113ab72
No known key found for this signature in database
GPG key ID: CFF795E7811C0093
2 changed files with 8 additions and 6 deletions

6
lightning/src/io/mod.rs Normal file
View file

@ -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::*;

View file

@ -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)]