Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
b5 committed Oct 23, 2022
1 parent be4e2f1 commit e655b10
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions iroh-api/src/p2p.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use crate::error::map_service_error;
use std::collections::HashMap;
use anyhow::Result;
use async_trait::async_trait;
use iroh_rpc_client::{Lookup, P2pClient};
use libp2p::{multiaddr::Protocol, Multiaddr, PeerId};
#[cfg(feature = "testing")]
use mockall::automock;
use std::collections::HashMap;

pub struct ClientP2p {
client: P2pClient,
Expand Down Expand Up @@ -73,7 +73,10 @@ impl P2p for ClientP2p {
}

async fn peers(&self) -> Result<HashMap<PeerId, Vec<Multiaddr>>> {
self.client.get_peers().await
self.client
.get_peers()
.await
.map_err(|e| map_service_error("p2p", e))
}
}

Expand Down

0 comments on commit e655b10

Please sign in to comment.