update for windows

This commit is contained in:
Jett Chen 2023-12-17 03:22:18 +08:00
parent b60c6ad687
commit 9f84fc6efa
5 changed files with 20 additions and 1 deletions

View file

@ -2,6 +2,8 @@ use std::io::Error;
use fehler::throws;
#[cfg(any(target_os = "linux", target_vendor = "apple"))]
#[cfg(feature = "tokio")]
use super::tokio::TunInterface;
#[derive(Debug, Clone, Default)]
@ -47,6 +49,8 @@ impl TunOptions {
self
}
#[cfg(any(target_os = "linux", target_vendor = "apple"))]
#[cfg(feature = "tokio")]
#[throws]
pub fn open(self) -> TunInterface {
let ti = super::TunInterface::new_with_options(self)?;