diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-02-04 00:32:36 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-02-04 01:29:28 +0100 |
| commit | 8b679519a277c65d449d48c6fa48491b5d158b61 (patch) | |
| tree | 2fcb082b3e3a7212244660ddbbf67de0911e81fc /src/process | |
| parent | 16b1603abb78563bfde5964b0d19347bd0cc7533 (diff) | |
| download | mullvadvpn-8b679519a277c65d449d48c6fa48491b5d158b61.tar.xz mullvadvpn-8b679519a277c65d449d48c6fa48491b5d158b61.zip | |
Use assert_matches crate to implement assert_event
Diffstat (limited to 'src/process')
| -rw-r--r-- | src/process/monitor.rs | 5 |
1 files changed, 1 insertions, 4 deletions
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); }} } |
