mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
chore: fix build warning for Windows
This commit is contained in:
@@ -36,6 +36,6 @@ where
|
||||
let handle = socket.as_raw_socket();
|
||||
let sock = unsafe { Socket::from_raw_socket(handle) };
|
||||
let result = sock.set_only_v6(ipv6_only);
|
||||
sock.into_raw_socket();
|
||||
let _ = sock.into_raw_socket();
|
||||
result
|
||||
}
|
||||
|
||||
@@ -28,8 +28,6 @@ use shadowsocks::{
|
||||
ServerConfig,
|
||||
};
|
||||
use tokio::{runtime::Handle, sync::mpsc, task::JoinHandle, time};
|
||||
#[cfg(windows)]
|
||||
use windows_sys::Win32::Networking::WinSock::WSAEAFNOSUPPORT;
|
||||
|
||||
use crate::net::{
|
||||
packet_window::PacketWindowFilter, utils::to_ipv4_mapped, MonProxySocket, UDP_ASSOCIATION_KEEP_ALIVE_CHANNEL_SIZE,
|
||||
|
||||
@@ -87,7 +87,7 @@ where
|
||||
|
||||
let sock = unsafe { Socket::from_raw_socket(handle) };
|
||||
let result = socket_bind_dual_stack_inner(&sock, addr, ipv6_only);
|
||||
sock.into_raw_socket();
|
||||
let _ = sock.into_raw_socket();
|
||||
|
||||
result
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
//! Local server launchers
|
||||
|
||||
#[cfg(unix)]
|
||||
use std::sync::Arc;
|
||||
use std::{
|
||||
future::Future,
|
||||
net::IpAddr,
|
||||
path::PathBuf,
|
||||
process::ExitCode,
|
||||
sync::Arc,
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
|
||||
@@ -1065,7 +1066,7 @@ struct ServerReloader {
|
||||
}
|
||||
|
||||
impl ServerReloader {
|
||||
#[cfg_attr(not(any(unix, feature = "local-online-config")), allow(dead_code))]
|
||||
#[cfg_attr(not(unix), allow(dead_code))]
|
||||
async fn run_once(&self) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let start_time = Instant::now();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user