Moved IO traits into platform module

This commit is contained in:
Mathias Hall-Andersen
2019-10-23 12:08:35 +02:00
parent 3fa928b315
commit ee3599d550
26 changed files with 352 additions and 270 deletions

View File

@@ -1,6 +1,4 @@
use super::super::super::wireguard::tun::*;
use super::super::PlatformTun;
use super::super::Tun;
use super::super::tun::*;
use libc::*;
@@ -127,7 +125,7 @@ impl Tun for LinuxTun {
type MTU = LinuxTunMTU;
}
impl PlatformTun for LinuxTun {
impl Platform for LinuxTun {
fn create(name: &str) -> Result<(Vec<Self::Reader>, Self::Writer, Self::MTU), Self::Error> {
// construct request struct
let mut req = Ifreq {