Skip to content

Commit

Permalink
Fix cargo clippy warnings for android for ios
Browse files Browse the repository at this point in the history
  • Loading branch information
kp-mariappan-ramasamy committed Jul 23, 2024
1 parent 5dab8a0 commit 770f353
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/platform/posix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
//! POSIX compliant support.

mod sockaddr;
pub(crate) use sockaddr::{ipaddr_to_sockaddr, sockaddr_union};
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))]
pub(crate) use sockaddr::sockaddr_union;

#[cfg(any(target_os = "linux", target_os = "macos"))]
pub(crate) use sockaddr::ipaddr_to_sockaddr;

mod fd;
pub(crate) use self::fd::Fd;
Expand Down
3 changes: 2 additions & 1 deletion src/platform/posix/sockaddr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ fn rs_addr_to_sockaddr(addr: std::net::SocketAddr) -> sockaddr_union {

/// # Safety
/// Fill the `addr` with the `src_addr` and `src_port`, the `size` should be the size of overwriting
pub unsafe fn ipaddr_to_sockaddr<T>(
#[cfg(any(target_os = "linux", target_os = "macos"))]
pub(crate) unsafe fn ipaddr_to_sockaddr<T>(
src_addr: T,
src_port: u16,
addr: &mut libc::sockaddr,
Expand Down

0 comments on commit 770f353

Please sign in to comment.