diff options
author | 2020-02-21 00:31:00 +0100 | |
---|---|---|
committer | 2020-02-21 00:31:00 +0100 | |
commit | 8de2305cc73920d838e11634dc9ec619c2608a78 (patch) | |
tree | 908d2f34bfd0a7a329f4f7223ad40ba809c66a13 /src/wireguard/router/device.rs | |
parent | More comprehensive unit tests for router (diff) | |
download | wireguard-rs-8de2305cc73920d838e11634dc9ec619c2608a78.tar.xz wireguard-rs-8de2305cc73920d838e11634dc9ec619c2608a78.zip |
Fixed unit tests
Diffstat (limited to 'src/wireguard/router/device.rs')
-rw-r--r-- | src/wireguard/router/device.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wireguard/router/device.rs b/src/wireguard/router/device.rs index 8bfa261..7c90f22 100644 --- a/src/wireguard/router/device.rs +++ b/src/wireguard/router/device.rs @@ -121,14 +121,14 @@ impl<E: Endpoint, C: Callbacks, T: tun::Writer, B: udp::Writer<E>> DeviceHandle< // start worker threads let mut threads = Vec::with_capacity(num_workers); while let Some(rx) = consumers.pop() { - println!("spawn"); - threads.push(thread::spawn(move || { - println!("spawned"); - worker(rx); - })); + threads.push(thread::spawn(move || worker(rx))); } debug_assert!(num_workers > 0, "zero worker threads"); - debug_assert_eq!(threads.len(), num_workers); + debug_assert_eq!( + threads.len(), + num_workers, + "workers does not match consumers" + ); // return exported device handle DeviceHandle { |