aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Grunert <mail@saschagrunert.de>2017-02-28 16:03:12 +0100
committerSascha Grunert <mail@saschagrunert.de>2017-02-28 16:03:12 +0100
commit75fc486de60ca6f16589c254f172e328a90e6e2d (patch)
tree376e954ef7f5e8a3c817ed7bea2b505e101c31f8
parentRemoved unsafe Rust (diff)
downloadwireguard-rs-75fc486de60ca6f16589c254f172e328a90e6e2d.tar.xz
wireguard-rs-75fc486de60ca6f16589c254f172e328a90e6e2d.zip
Using "use" statements on top of file
-rw-r--r--src/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index c0dd6cb..0bbe14b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -22,6 +22,8 @@ use std::fs::{create_dir, remove_file};
use std::mem::size_of;
use std::path::{Path, PathBuf};
+use libc::{FIONREAD, ioctl};
+
use nix::poll::{EventFlags, poll, PollFd, POLLIN, POLLERR, POLLHUP, POLLNVAL};
use nix::sys::socket::{accept, AddressFamily, bind, listen, SockAddr, SockType, SockFlag, socket, UnixAddr};
use nix::unistd::{close, read};
@@ -111,7 +113,6 @@ impl WireGuard {
}
// Get the size of the message
- use libc::{FIONREAD, ioctl};
trace!("Getting message size.");
let message_len = 0;
let ret = unsafe { ioctl(client, FIONREAD, &message_len) };