From b4a9b962dd65629e5e115428abec21b048292927 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 30 May 2022 17:50:02 +0000 Subject: [PATCH] Re-export `core2::io` or `std::io` depending on feature flags This is useful in bindings as the `lightning::io` module is used in the public interface, but also useful for users who want to refer to the `io` as used in lightning irrespective of the feature flags. --- lightning/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lightning/src/lib.rs b/lightning/src/lib.rs index 3f88a208..ba6d6bc7 100644 --- a/lightning/src/lib.rs +++ b/lightning/src/lib.rs @@ -78,9 +78,11 @@ pub mod ln; pub mod routing; #[cfg(feature = "std")] -use std::io; +/// Re-export of either `core2::io` or `std::io`, depending on the `std` feature flag. +pub use std::io; #[cfg(not(feature = "std"))] -use core2::io; +/// Re-export of either `core2::io` or `std::io`, depending on the `std` feature flag. +pub use core2::io; #[cfg(not(feature = "std"))] mod io_extras { -- 2.30.2