diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-02-06 10:05:14 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-02-06 10:05:14 +0100 |
| commit | 7eeaf41b1177ddfe70f70203afa499f04bb8de2d (patch) | |
| tree | e5fc2e9d4378b6dda6c9fb91b789da64d76315ae /src/process | |
| parent | 1c15ddfd97afeba755ab591c205785f9be7608e1 (diff) | |
| parent | ec1b76dd28c90894200fc0a19fa964643e815cbf (diff) | |
| download | mullvadvpn-7eeaf41b1177ddfe70f70203afa499f04bb8de2d.tar.xz mullvadvpn-7eeaf41b1177ddfe70f70203afa499f04bb8de2d.zip | |
Merge branch 'assert_matches'
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); }} } |
