mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-16 02:45:41 +00:00
chore: update Rust to 1.95; replace cfg_if with cfg_select (#2121)
This commit is contained in:
@@ -2,8 +2,8 @@ pub mod pnet;
|
||||
|
||||
use std::{io, net::SocketAddr, sync::Arc};
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(target_os = "linux")] {
|
||||
cfg_select! {
|
||||
target_os = "linux" => {
|
||||
pub mod linux_bpf;
|
||||
|
||||
pub fn create_tun(
|
||||
@@ -26,7 +26,9 @@ cfg_if::cfg_if! {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if #[cfg(all(target_os = "macos", not(feature = "macos-ne")))] {
|
||||
}
|
||||
|
||||
all(target_os = "macos", not(feature = "macos-ne")) => {
|
||||
pub mod macos_bpf;
|
||||
|
||||
pub fn create_tun(
|
||||
@@ -49,7 +51,9 @@ cfg_if::cfg_if! {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if #[cfg(all(windows, any(target_arch = "x86_64", target_arch = "x86")))] {
|
||||
}
|
||||
|
||||
all(windows, any(target_arch = "x86_64", target_arch = "x86")) => {
|
||||
pub mod windivert;
|
||||
|
||||
pub fn create_tun(
|
||||
@@ -72,7 +76,9 @@ cfg_if::cfg_if! {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
_ => {
|
||||
pub fn create_tun(
|
||||
interface_name: &str,
|
||||
src_addr: Option<SocketAddr>,
|
||||
|
||||
Reference in New Issue
Block a user