Skip to content

Commit 130e2ca

Browse files
committed
Resolve "unused imports" warning
1 parent 6c3c339 commit 130e2ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/wasi/src/sockets/udp.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use io_lifetimes::AsSocketlike as _;
1010
use io_lifetimes::raw::{FromRawSocketlike as _, IntoRawSocketlike as _};
1111
use rustix::io::Errno;
1212
use rustix::net::connect;
13-
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};
13+
use std::net::SocketAddr;
1414
use std::sync::Arc;
1515
use tracing::debug;
1616

@@ -217,6 +217,8 @@ impl UdpSocket {
217217
if socket.is_ok()
218218
&& let UdpState::Default = self.udp_state
219219
{
220+
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
221+
220222
let ip_addr = match self.family {
221223
SocketAddressFamily::Ipv4 => IpAddr::V4(Ipv4Addr::UNSPECIFIED),
222224
SocketAddressFamily::Ipv6 => IpAddr::V6(Ipv6Addr::UNSPECIFIED),

0 commit comments

Comments
 (0)