fix clippy errors

This commit is contained in:
binarybaron 2024-06-27 17:30:41 +02:00
parent 6d45d86562
commit a985ca504c
2 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
use async_trait::async_trait;
use futures::stream::FusedStream;
use futures::{future, Future, Stream, StreamExt};
use futures::{future, Future, StreamExt};
use libp2p::core::muxing::StreamMuxerBox;
use libp2p::core::transport::upgrade::Version;
use libp2p::core::transport::MemoryTransport;
@ -75,8 +75,8 @@ async fn get_local_tcp_address() -> Multiaddr {
}
pub async fn await_events_or_timeout<A, B, E1, E2>(
swarm_1: &mut (impl Stream<Item = SwarmEvent<A, E1>> + FusedStream + Unpin),
swarm_2: &mut (impl Stream<Item = SwarmEvent<B, E2>> + FusedStream + Unpin),
swarm_1: &mut (impl FusedStream<Item = SwarmEvent<A, E1>> + FusedStream + Unpin),
swarm_2: &mut (impl FusedStream<Item = SwarmEvent<B, E2>> + FusedStream + Unpin),
) -> (SwarmEvent<A, E1>, SwarmEvent<B, E2>)
where
SwarmEvent<A, E1>: Debug,

View File

@ -435,10 +435,10 @@ impl BobParams {
}
let db = Arc::new(SqliteDatabase::open(&self.db_path).await?);
let (event_loop, handle) = self.new_eventloop(swap_id, db).await?;
let (event_loop, handle) = self.new_eventloop(swap_id, db.clone()).await?;
let swap = bob::Swap::from_db(
db,
db.clone(),
swap_id,
self.bitcoin_wallet.clone(),
self.monero_wallet.clone(),
@ -504,7 +504,7 @@ impl BobParams {
.behaviour_mut()
.add_address(self.alice_peer_id, self.alice_address.clone());
cli::EventLoop::new(swap_id, swarm, self.alice_peer_id, db.clone());
cli::EventLoop::new(swap_id, swarm, self.alice_peer_id, db.clone())
}
}