attach associated type Time to UdpSocket trait

This commit is contained in:
Dirkjan Ochtman
2020-10-14 15:49:20 +02:00
committed by Benjamin Fry
parent 578d268f70
commit 025f62640f
2 changed files with 8 additions and 0 deletions

View File

@@ -20,6 +20,8 @@ pub struct AsyncStdUdpSocket(async_std::net::UdpSocket);
#[async_trait]
impl UdpSocket for AsyncStdUdpSocket {
type Time = AsyncStdTime;
async fn bind(addr: &SocketAddr) -> io::Result<Self> {
async_std::net::UdpSocket::bind(addr)
.await