diff options
Diffstat (limited to 'ipfs-api/examples/ping_peer.rs')
-rw-r--r-- | ipfs-api/examples/ping_peer.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ipfs-api/examples/ping_peer.rs b/ipfs-api/examples/ping_peer.rs index be55dd5..9cd7835 100644 --- a/ipfs-api/examples/ping_peer.rs +++ b/ipfs-api/examples/ping_peer.rs @@ -11,7 +11,7 @@ extern crate hyper; extern crate ipfs_api; use futures::{Future, Stream}; -use ipfs_api::{IpfsClient, response::PingResponse}; +use ipfs_api::{response::PingResponse, IpfsClient}; // Creates an Ipfs client, discovers a connected peer, and pings it using the // streaming Api, and by collecting it into a collection. @@ -51,13 +51,11 @@ fn main() { ping_gather }) - }) - .map(|pings: Vec<PingResponse>| { + }).map(|pings: Vec<PingResponse>| { for ping in pings.iter() { println!("got response ({:?}) at ({})...", ping.text, ping.time); } - }) - .map_err(|e| eprintln!("{}", e)); + }).map_err(|e| eprintln!("{}", e)); hyper::rt::run(req); } |