Allow dead code in sys/pal

The dead_code lint was previously eroneously missing this dead code.
Since this lint bug has been fixed, the unused field need
to be removed or marked as `#[allow(dead_code)]`.

These structures API is common to all platforms so the code cannot be
removed and is hence marked allow(dead_code).
This commit is contained in:
Arthur Carcano 2024-02-20 21:50:20 +01:00
parent e78851813e
commit f60c4ed197
3 changed files with 6 additions and 0 deletions

View File

@ -524,6 +524,7 @@ pub mod netc {
#[derive(Copy, Clone)]
pub struct sockaddr_in {
#[allow(dead_code)]
pub sin_family: sa_family_t,
pub sin_port: u16,
pub sin_addr: in_addr,
@ -536,6 +537,7 @@ pub mod netc {
#[derive(Copy, Clone)]
pub struct sockaddr_in6 {
#[allow(dead_code)]
pub sin6_family: sa_family_t,
pub sin6_port: u16,
pub sin6_addr: in6_addr,

View File

@ -346,6 +346,7 @@ pub mod netc {
#[derive(Copy, Clone)]
pub struct sockaddr_in {
#[allow(dead_code)]
pub sin_family: sa_family_t,
pub sin_port: u16,
pub sin_addr: in_addr,
@ -358,6 +359,7 @@ pub mod netc {
#[derive(Copy, Clone)]
pub struct sockaddr_in6 {
#[allow(dead_code)]
pub sin6_family: sa_family_t,
pub sin6_port: u16,
pub sin6_addr: in6_addr,

View File

@ -520,6 +520,7 @@ pub mod netc {
#[derive(Copy, Clone)]
pub struct sockaddr_in {
#[allow(dead_code)]
pub sin_family: sa_family_t,
pub sin_port: u16,
pub sin_addr: in_addr,
@ -532,6 +533,7 @@ pub mod netc {
#[derive(Copy, Clone)]
pub struct sockaddr_in6 {
#[allow(dead_code)]
pub sin6_family: sa_family_t,
pub sin6_port: u16,
pub sin6_addr: in6_addr,