fix clippy and compile errors

This commit is contained in:
XOR-op
2023-01-20 02:51:15 +08:00
committed by Benjamin Fry
parent 22beac02ce
commit 03af149076
16 changed files with 153 additions and 138 deletions

View File

@@ -10,6 +10,7 @@ use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr};
use std::pin::Pin;
use std::task::{Context, Poll};
use crate::proto::quic::QuicLocalAddr;
use crate::proto::udp::DnsUdpSocket;
use async_std::task::spawn_blocking;
use async_trait::async_trait;
@@ -59,6 +60,12 @@ impl DnsUdpSocket for AsyncStdUdpSocket {
}
}
impl QuicLocalAddr for AsyncStdUdpSocket {
fn local_addr(&self) -> io::Result<SocketAddr> {
self.0.local_addr()
}
}
#[async_trait]
impl UdpSocket for AsyncStdUdpSocket {
async fn connect(addr: SocketAddr) -> io::Result<Self> {