]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fix several "unused" warnings introduced in #1417 2022-04-fix-warnings
authorMatt Corallo <git@bluematt.me>
Sun, 24 Apr 2022 16:03:26 +0000 (16:03 +0000)
committerMatt Corallo <git@bluematt.me>
Sun, 24 Apr 2022 16:03:26 +0000 (16:03 +0000)
lightning-background-processor/src/lib.rs
lightning-persister/src/util.rs

index 6beee915b309772ae500bd61211a929e6382682d..7a1512b79b8af92140474d1fc4c3f9b2346a15f4 100644 (file)
@@ -335,10 +335,9 @@ mod tests {
        use bitcoin::blockdata::constants::genesis_block;
        use bitcoin::blockdata::transaction::{Transaction, TxOut};
        use bitcoin::network::constants::Network;
-       use lightning::chain::chaininterface::{BroadcasterInterface, FeeEstimator};
-       use lightning::chain::{BestBlock, Confirm, chainmonitor, self};
+       use lightning::chain::{BestBlock, Confirm, chainmonitor};
        use lightning::chain::channelmonitor::ANTI_REORG_DELAY;
-       use lightning::chain::keysinterface::{InMemorySigner, Recipient, KeysInterface, KeysManager, Sign};
+       use lightning::chain::keysinterface::{InMemorySigner, Recipient, KeysInterface, KeysManager};
        use lightning::chain::transaction::OutPoint;
        use lightning::get_event_msg;
        use lightning::ln::channelmanager::{BREAKDOWN_TIMEOUT, ChainParameters, ChannelManager, SimpleArcChannelManager};
@@ -348,15 +347,13 @@ mod tests {
        use lightning::routing::network_graph::{NetworkGraph, NetGraphMsgHandler};
        use lightning::util::config::UserConfig;
        use lightning::util::events::{Event, MessageSendEventsProvider, MessageSendEvent};
-       use lightning::util::logger::Logger;
        use lightning::util::ser::Writeable;
        use lightning::util::test_utils;
        use lightning::util::persist::KVStorePersister;
        use lightning_invoice::payment::{InvoicePayer, RetryAttempts};
        use lightning_invoice::utils::DefaultRouter;
        use lightning_persister::FilesystemPersister;
-       use std::fs::{self, File};
-       use std::ops::Deref;
+       use std::fs;
        use std::path::PathBuf;
        use std::sync::{Arc, Mutex};
        use std::time::Duration;
@@ -399,7 +396,6 @@ mod tests {
        }
 
        struct Persister {
-               data_dir: String,
                graph_error: Option<(std::io::ErrorKind, &'static str)>,
                manager_error: Option<(std::io::ErrorKind, &'static str)>,
                filesystem_persister: FilesystemPersister,
@@ -408,7 +404,7 @@ mod tests {
        impl Persister {
                fn new(data_dir: String) -> Self {
                        let filesystem_persister = FilesystemPersister::new(data_dir.clone());
-                       Self { data_dir, graph_error: None, manager_error: None, filesystem_persister }
+                       Self { graph_error: None, manager_error: None, filesystem_persister }
                }
 
                fn with_graph_error(self, error: std::io::ErrorKind, message: &'static str) -> Self {
index 25bd00f5e9539ee8b486b79cb7436278015a5698..4adbb33e5b26fd886fb64d05d3d315efd3f28b16 100644 (file)
@@ -84,7 +84,6 @@ mod tests {
        use super::{write_to_file};
        use std::fs;
        use std::io;
-       use std::io::Write;
        use std::path::PathBuf;
 
        struct TestWriteable{}