1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-27 18:02:58 +01:00

add Display impl for Connect

This commit is contained in:
Nikolay Kim 2018-10-29 14:04:53 -07:00
parent 4b16af29c7
commit a8a831a098

View File

@ -1,7 +1,7 @@
use std::collections::VecDeque; use std::collections::VecDeque;
use std::io;
use std::net::SocketAddr; use std::net::SocketAddr;
use std::time::Duration; use std::time::Duration;
use std::{fmt, io};
use futures::{ use futures::{
future::{ok, FutureResult}, future::{ok, FutureResult},
@ -87,6 +87,12 @@ impl HostAware for Connect {
} }
} }
impl fmt::Display for Connect {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}:{}", self.host, self.port)
}
}
pub struct Connector { pub struct Connector {
resolver: Resolver<Connect>, resolver: Resolver<Connect>,
} }