Update futures and tokio alphas

This commit is contained in:
Sean McArthur
2019-08-29 14:25:17 -07:00
parent f4378bae58
commit 678c90eb0a
12 changed files with 32 additions and 27 deletions

View File

@@ -9,7 +9,7 @@ use tokio::net::TcpStream;
pub async fn main() -> Result<(), Box<dyn Error>> {
let _ = env_logger::try_init();
let tcp = TcpStream::connect(&"127.0.0.1:5928".parse().unwrap()).await?;
let tcp = TcpStream::connect("127.0.0.1:5928").await?;
let (mut client, h2) = client::handshake(tcp).await?;
println!("sending request");

View File

@@ -10,7 +10,7 @@ use tokio::net::{TcpListener, TcpStream};
pub async fn main() -> Result<(), Box<dyn Error>> {
let _ = env_logger::try_init();
let mut listener = TcpListener::bind(&"127.0.0.1:5928".parse()?)?;
let mut listener = TcpListener::bind("127.0.0.1:5928").await?;
println!("listening on {:?}", listener.local_addr());