Skip to content

Commit

Permalink
chore: fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
eycorsican committed Sep 26, 2023
1 parent f6a4322 commit 22ee67d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions leaf/src/proxy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use tracing::trace;
#[cfg(unix)]
use std::os::unix::io::{AsFd, AsRawFd};
#[cfg(windows)]
use std::os::windows::io::AsRawSocket;
use std::os::windows::io::{AsRawSocket, AsSocket};

Check warning on line 21 in leaf/src/proxy/mod.rs

View workflow job for this annotation

GitHub Actions / build-bin-cross (x86_64-pc-windows-gnu)

unused import: `AsRawSocket`
#[cfg(target_os = "android")]
use {
std::os::unix::io::RawFd, tokio::io::AsyncReadExt, tokio::io::AsyncWriteExt,
Expand Down Expand Up @@ -339,7 +339,7 @@ fn apply_socket_opts<S: AsFd>(socket: &S) -> io::Result<()> {
apply_socket_opts_internal(sock_ref)
}
#[cfg(windows)]
fn apply_socket_opts<S: AsRawSocket>(socket: &S) -> io::Result<()> {
fn apply_socket_opts<S: AsSocket>(socket: &S) -> io::Result<()> {
let sock_ref = SockRef::from(socket);
apply_socket_opts_internal(sock_ref)
}
Expand Down

0 comments on commit 22ee67d

Please sign in to comment.