mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-29 01:31:33 +00:00
Run rustfmt on files that aren't really touched (#289)
This commit is contained in:
@ -95,8 +95,8 @@ use futures::sync::{mpsc, oneshot};
|
||||
use futures::{Future, Sink, Stream};
|
||||
use libp2p_core::{ConnectionUpgrade, Endpoint};
|
||||
use parking_lot::Mutex;
|
||||
use rand::Rand;
|
||||
use rand::os::OsRng;
|
||||
use rand::Rand;
|
||||
use std::collections::HashMap;
|
||||
use std::error::Error;
|
||||
use std::io::Error as IoError;
|
||||
@ -161,8 +161,7 @@ where
|
||||
// TODO: can't figure out how to make it work without using an Arc/Mutex
|
||||
let expected_pongs = Arc::new(Mutex::new(HashMap::with_capacity(4)));
|
||||
|
||||
let sink_stream = Framed::new(socket, Codec)
|
||||
.map(|msg| Message::Received(msg.freeze()));
|
||||
let sink_stream = Framed::new(socket, Codec).map(|msg| Message::Received(msg.freeze()));
|
||||
let (sink, stream) = sink_stream.split();
|
||||
|
||||
let future = loop_fn((sink, stream.select(rx)), move |(sink, stream)| {
|
||||
@ -290,9 +289,9 @@ mod tests {
|
||||
use self::tokio_core::net::TcpStream;
|
||||
use self::tokio_core::reactor::Core;
|
||||
use super::Ping;
|
||||
use futures::future::{self, join_all};
|
||||
use futures::Future;
|
||||
use futures::Stream;
|
||||
use futures::future::{self, join_all};
|
||||
use libp2p_core::{ConnectionUpgrade, Endpoint, Multiaddr};
|
||||
use std::io::Error as IoError;
|
||||
|
||||
|
Reference in New Issue
Block a user