diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 3 | ||||
| -rw-r--r-- | src/process/monitor.rs | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs index 1b3cf59b66..7a3c2ee659 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,6 +2,9 @@ //! The core components of the talpidaemon VPN client. +#[macro_use] +extern crate assert_matches; + extern crate clonablechild; /// Working with processes. diff --git a/src/process/monitor.rs b/src/process/monitor.rs index a9d6c0b36b..e8d32a7973 100644 --- a/src/process/monitor.rs +++ b/src/process/monitor.rs @@ -247,10 +247,7 @@ mod child_monitor { macro_rules! assert_event { ($rx:ident, $expected:pat) => {{ let result = $rx.recv_timeout(Duration::new(1, 0)); - if let $expected = result {} else { - let msg = stringify!($expected); - panic!("Expected {}. Got {:?}", msg, result); - } + assert_matches!(result, $expected); }} } |
