Clean dependencies and imports

This commit is contained in:
Mathias Hall-Andersen
2019-11-21 11:43:16 +01:00
parent 3ba0247634
commit 92dbb4c46a
11 changed files with 59 additions and 65 deletions

View File

@@ -1,19 +1,14 @@
#![feature(test)]
#![allow(dead_code)]
extern crate jemallocator;
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
mod configuration;
mod platform;
mod wireguard;
use log;
use std::env;
mod configuration;
mod platform;
mod wireguard;
use platform::tun::PlatformTun;
use platform::uapi::{BindUAPI, PlatformUAPI};
use platform::*;
@@ -34,7 +29,10 @@ fn main() {
return;
}
let _ = env_logger::builder().is_test(true).try_init();
// start logging
env_logger::builder()
.try_init()
.expect("Failed to initialize event logger");
// create UAPI socket
let uapi = plt::UAPI::bind(name.as_str()).unwrap();