Skip to content

Commit e247613

Browse files
committed
Fix lightning-rapid-gossip-sync warnings.
1 parent 8ef041f commit e247613

File tree

1 file changed

+3
-5
lines changed
  • lightning-rapid-gossip-sync/src

1 file changed

+3
-5
lines changed

lightning-rapid-gossip-sync/src/lib.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ use lightning::io;
7474
use lightning::ln::msgs::{DecodeError, LightningError};
7575
use lightning::routing::gossip::NetworkGraph;
7676
use lightning::util::logger::Logger;
77-
#[cfg(feature = "std")]
78-
use std::fs::File;
7977

8078
/// Core functionality of this crate
8179
mod processing;
@@ -145,11 +143,11 @@ where
145143
///
146144
/// `sync_path`: Path to the file where the gossip update data is located
147145
///
148-
#[cfg(feature = "std")]
146+
#[cfg(all(feature = "std", not(feature = "no-std")))]
149147
pub fn sync_network_graph_with_file_path(
150148
&self, sync_path: &str,
151149
) -> Result<u32, GraphSyncError> {
152-
let file = File::open(sync_path).map_err(|e| {
150+
let file = std::fs::File::open(sync_path).map_err(|e| {
153151
let bitcoin_error: bitcoin::io::Error = e.into();
154152
bitcoin_error
155153
})?;
@@ -193,7 +191,7 @@ where
193191
}
194192
}
195193

196-
#[cfg(feature = "std")]
194+
#[cfg(all(feature = "std", not(feature = "no-std")))]
197195
#[cfg(test)]
198196
mod tests {
199197
use std::fs;

0 commit comments

Comments
 (0)