Skip to content

Commit db5b483

Browse files
committed
f
1 parent 34fe1e5 commit db5b483

File tree

4 files changed

+5
-15
lines changed

4 files changed

+5
-15
lines changed

lightning/src/lib.rs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ extern crate core;
4747

4848
#[cfg(feature = "no_std")] extern crate core2;
4949

50-
5150
#[macro_use]
5251
pub mod util;
5352
pub mod chain;
@@ -126,6 +125,8 @@ mod io_extras {
126125
d.read_to_end(&mut buf)?;
127126
Ok(buf)
128127
}
128+
129+
pub use std::io::{copy, sink};
129130
}
130131

131132
mod prelude {
@@ -138,22 +139,8 @@ mod prelude {
138139
#[cfg(feature = "hashbrown")]
139140
pub use self::hashbrown::{HashMap, HashSet, hash_map};
140141

141-
#[cfg(feature = "std")]
142-
pub use std::io::sink;
143-
144-
#[cfg(not(feature = "std"))]
145-
pub use io_extras::sink;
146-
147-
#[cfg(feature = "std")]
148-
pub use std::io::copy;
149-
150-
#[cfg(not(feature = "std"))]
151-
pub use io_extras::copy;
152-
153142
pub use alloc::borrow::ToOwned;
154143
pub use alloc::string::ToString;
155-
156-
pub use io_extras::read_to_end;
157144
}
158145

159146
#[cfg(feature = "std")]

lightning/src/ln/msgs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ use prelude::*;
3636
use core::{cmp, fmt};
3737
use core::fmt::Debug;
3838
use io::{self, Read};
39+
use io_extras::read_to_end;
3940

4041
use util::events::MessageSendEventsProvider;
4142
use util::logger;

lightning/src/util/ser.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
1313
use prelude::*;
1414
use io::{self, Read, Write};
15+
use io_extras::{copy, sink};
1516
use core::hash::Hash;
1617
use sync::Mutex;
1718
use core::cmp;

lightning/src/util/transaction_utils.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use bitcoin::consensus::encode::VarInt;
1515
use ln::msgs::MAX_VALUE_MSAT;
1616

1717
use prelude::*;
18+
use io_extras::sink;
1819
use core::cmp::Ordering;
1920

2021
pub fn sort_outputs<T, C : Fn(&T, &T) -> Ordering>(outputs: &mut Vec<(TxOut, T)>, tie_breaker: C) {

0 commit comments

Comments
 (0)