From: Matt Corallo Date: Mon, 30 May 2022 17:50:02 +0000 (+0000) Subject: Re-export `core2::io` or `std::io` depending on feature flags X-Git-Tag: v0.0.107~8^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=b4a9b962dd65629e5e115428abec21b048292927;p=rust-lightning 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. --- 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 {