Skip to content

Commit b05113a

Browse files
committed
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.
1 parent fb818e0 commit b05113a

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

lightning/src/io/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#[cfg(not(feature = "std"))]
2+
/// Re-export of either `core2::io` or `std::io`, depending on the `std` feature flag.
3+
pub use core2::io::*;
4+
#[cfg(feature = "std")]
5+
/// Re-export of either `core2::io` or `std::io`, depending on the `std` feature flag.
6+
pub use std::io::*;

lightning/src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,8 @@ pub mod events;
8888

8989
pub(crate) mod crypto;
9090

91-
#[cfg(feature = "std")]
92-
/// Re-export of either `core2::io` or `std::io`, depending on the `std` feature flag.
93-
pub use std::io;
94-
#[cfg(not(feature = "std"))]
95-
/// Re-export of either `core2::io` or `std::io`, depending on the `std` feature flag.
96-
pub use core2::io;
91+
/// Extension of the bitcoin::io module
92+
pub mod io;
9793

9894
#[cfg(not(feature = "std"))]
9995
#[doc(hidden)]

0 commit comments

Comments
 (0)