Skip to content

Commit

Permalink
Handle strange variable unused on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
umgefahren committed Mar 7, 2024
1 parent ce7596c commit 0506c7b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions transports/tcp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ where
if port_use == PortUse::Reuse {
socket.set_reuse_port(true)?;
}

#[cfg(not(all(unix, not(any(target_os = "solaris", target_os = "illumos")))))]
let _ = port_use; // silence the unused warning on non-unix platforms (i.e. Windows)

Ok(socket)
}

Expand Down

0 comments on commit 0506c7b

Please sign in to comment.