fixup! net/udp: Relay full UdpMetadata instead of only remote endpoint in poll_ functions

This commit is contained in:
chrysn 2024-04-19 15:51:27 +02:00
parent e6bf6c7a49
commit 2c7c39d1db

View File

@ -145,9 +145,9 @@ impl<'a> UdpSocket<'a> {
/// When the remote endpoint is not reachable, this method will return `Err(SendError::NoRoute)`
pub async fn send_to<T>(&self, buf: &[u8], remote_endpoint: T) -> Result<(), SendError>
where
T: Into<IpEndpoint>,
T: Into<UdpMetadata>,
{
let remote_endpoint: IpEndpoint = remote_endpoint.into();
let remote_endpoint: UdpMetadata = remote_endpoint.into();
poll_fn(move |cx| self.poll_send_to(buf, remote_endpoint, cx)).await
}