aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-12-21 00:17:31 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-12-21 00:17:31 +0100
commitaabefa50436af8d614520bb219d675953eeba6eb (patch)
tree9186ef07b94f12e75040d5163477ef1e549cee14 /src/main.rs
parentConstant renamed to be consistent with kernel WG (diff)
downloadwireguard-rs-aabefa50436af8d614520bb219d675953eeba6eb.tar.xz
wireguard-rs-aabefa50436af8d614520bb219d675953eeba6eb.zip
Remove unused test code.
- make naming consistent with the kernel module. - better distribution of functionality from src/wireguard.rs - more consistent "import pattern" throughout the project. - remove unused test code.
Diffstat (limited to '')
-rw-r--r--src/main.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs
index 0cf7ae6..e9dbe82 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -125,11 +125,8 @@ fn main() {
wg.add_tun_reader(reader);
}
- // obtain handle for waiting
- let wait = wg.wait();
-
// wrap in configuration interface
- let cfg = configuration::WireguardConfig::new(wg);
+ let cfg = configuration::WireguardConfig::new(wg.clone());
// start Tun event thread
{
@@ -187,6 +184,6 @@ fn main() {
});
// block until all tun readers closed
- wait.wait();
+ wg.wait();
profiler_stop();
}