Skip to content

Commit 7fc340c

Browse files
committed
Fix #101 Merge 0rphon/rust-tun
Co-authored-by: 0rphon <59403052+0rphon@users.noreply.github.com>
2 parents 1cea287 + e7e7a5a commit 7fc340c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/platform/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
1717
#[cfg(unix)]
1818
pub(crate) mod posix;
19+
#[cfg(unix)]
20+
pub use posix::{Reader, Writer};
1921

2022
#[cfg(all(target_os = "linux", not(target_env = "ohos")))]
2123
pub(crate) mod linux;
@@ -54,7 +56,7 @@ pub use crate::platform::posix::Tun;
5456
#[cfg(target_os = "windows")]
5557
pub(crate) mod windows;
5658
#[cfg(target_os = "windows")]
57-
pub use self::windows::{create, Device, PlatformConfig, Tun};
59+
pub use self::windows::{create, Device, PlatformConfig, Reader, Tun, Writer};
5860

5961
#[cfg(test)]
6062
mod test {

src/platform/windows/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::configuration::Configuration;
2020
use crate::error::Result;
2121
#[cfg(feature = "async")]
2222
pub use device::Driver;
23-
pub use device::{Device, Tun};
23+
pub use device::{Device, Reader, Tun, Writer};
2424
use std::ffi::OsString;
2525

2626
/// Windows-only interface configuration.

0 commit comments

Comments
 (0)