mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-28 10:11:19 +00:00
Switch ping to edition 2018 (#780)
This commit is contained in:
parent
0803e36d5a
commit
7b8e3dd613
@ -1,5 +1,6 @@
|
||||
[package]
|
||||
name = "libp2p-ping"
|
||||
edition = "2018"
|
||||
description = "Ping protocol for libp2p"
|
||||
version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
@ -18,6 +18,7 @@
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
use crate::protocol::{Ping, PingDialer};
|
||||
use futures::prelude::*;
|
||||
use libp2p_core::{
|
||||
OutboundUpgrade,
|
||||
@ -26,7 +27,6 @@ use libp2p_core::{
|
||||
upgrade::DeniedUpgrade
|
||||
};
|
||||
use log::warn;
|
||||
use protocol::{Ping, PingDialer};
|
||||
use std::{
|
||||
io, mem,
|
||||
time::{Duration, Instant},
|
||||
|
@ -81,19 +81,6 @@
|
||||
//! ```
|
||||
//!
|
||||
|
||||
extern crate arrayvec;
|
||||
extern crate bytes;
|
||||
extern crate futures;
|
||||
extern crate libp2p_core;
|
||||
extern crate log;
|
||||
extern crate multistream_select;
|
||||
extern crate parking_lot;
|
||||
extern crate rand;
|
||||
extern crate tokio_codec;
|
||||
extern crate tokio_io;
|
||||
extern crate tokio_timer;
|
||||
extern crate void;
|
||||
|
||||
pub use self::dial_layer::PeriodicPing;
|
||||
pub use self::listen_layer::PingListen;
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
use crate::protocol::{Ping, PingListener};
|
||||
use arrayvec::ArrayVec;
|
||||
use futures::prelude::*;
|
||||
use libp2p_core::{
|
||||
@ -27,7 +28,6 @@ use libp2p_core::{
|
||||
upgrade::DeniedUpgrade
|
||||
};
|
||||
use log::warn;
|
||||
use protocol::{Ping, PingListener};
|
||||
use std::io;
|
||||
use tokio_io::{AsyncRead, AsyncWrite};
|
||||
use void::{Void, unreachable};
|
||||
|
@ -320,11 +320,7 @@ impl Encoder for Codec {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
extern crate tokio;
|
||||
extern crate tokio_tcp;
|
||||
|
||||
use self::tokio_tcp::TcpListener;
|
||||
use self::tokio_tcp::TcpStream;
|
||||
use tokio_tcp::{TcpListener, TcpStream};
|
||||
use super::Ping;
|
||||
use futures::{Future, Stream};
|
||||
use libp2p_core::upgrade::{InboundUpgrade, OutboundUpgrade};
|
||||
|
Loading…
x
Reference in New Issue
Block a user