Skip to content

Commit

Permalink
allow clippy instead
Browse files Browse the repository at this point in the history
  • Loading branch information
youyuanwu committed Dec 17, 2024
1 parent 92928ae commit 3b15819
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ pub type u62 = u64;
pub type BOOLEAN = ::std::os::raw::c_uchar;

/// Family of an IP address.
pub type AddressFamily = c_types::ADDRESS_FAMILY;
pub const ADDRESS_FAMILY_UNSPEC: AddressFamily = c_types::AF_UNSPEC;
pub const ADDRESS_FAMILY_INET: AddressFamily = c_types::AF_INET;
pub const ADDRESS_FAMILY_INET6: AddressFamily = c_types::AF_INET6;
pub type AddressFamily = u16;
#[allow(clippy::unnecessary_cast)]
pub const ADDRESS_FAMILY_UNSPEC: AddressFamily = c_types::AF_UNSPEC as u16;
#[allow(clippy::unnecessary_cast)]
pub const ADDRESS_FAMILY_INET: AddressFamily = c_types::AF_INET as u16;
#[allow(clippy::unnecessary_cast)]
pub const ADDRESS_FAMILY_INET6: AddressFamily = c_types::AF_INET6 as u16;

/// IPv4 address payload.
#[repr(C)]
Expand Down

0 comments on commit 3b15819

Please sign in to comment.