Skip to content

Commit

Permalink
should be our last try
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC committed May 25, 2024
1 parent 1a4ca66 commit 97543c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sys/socket/sockopt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1446,11 +1446,13 @@ impl<'a> Set<'a, bool> for SetBool {
}

/// Getter for an `u8` value.
#[cfg(feature = "net")]
struct GetU8 {
len: socklen_t,
val: MaybeUninit<u8>,
}

#[cfg(feature = "net")]
impl Get<u8> for GetU8 {
fn uninit() -> Self {
GetU8 {
Expand Down Expand Up @@ -1478,10 +1480,12 @@ impl Get<u8> for GetU8 {
}

/// Setter for an `u8` value.
#[cfg(feature = "net")]
struct SetU8 {
val: u8,
}

#[cfg(feature = "net")]
impl<'a> Set<'a, u8> for SetU8 {
fn new(val: &'a u8) -> SetU8 {
SetU8 { val: *val }
Expand Down

0 comments on commit 97543c7

Please sign in to comment.