From 9adf397e3eea75f808207579d922944928b0f69d Mon Sep 17 00:00:00 2001 From: Gustav Behm Date: Thu, 22 Apr 2021 08:57:40 +0200 Subject: [PATCH] Use std instead of tokio in the client --- src/client.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/client.rs b/src/client.rs index 93afe6c..d51be71 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1,6 +1,5 @@ -#[tokio::main(flavor = "current_thread")] -async fn main() { +fn main() { let msg = std::env::args().nth(1).expect("incorrect invocation"); - let s = tokio::net::UdpSocket::bind("127.0.0.1:0").await.unwrap(); - s.send_to(msg.as_bytes(), "127.0.0.1:5086").await.unwrap(); + let s = std::net::UdpSocket::bind("127.0.0.1:0").unwrap(); + s.send_to(msg.as_bytes(), "127.0.0.1:5086").unwrap(); } -- 2.45.2