diff options
author | Taiki Endo <te316e89@gmail.com> | 2020-10-10 02:10:22 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-09 10:10:22 -0700 |
commit | 2e05399f4b6be41680036cc158348973689840ca (patch) | |
tree | 085adc304f1533697c8e37b13cab1e1ce5f83a71 /tokio/tests | |
parent | afe535283c68dec40c5fc7a810445e8c2380880f (diff) |
sync: move broadcast error types into broadcast::error module (#2937)
Refs: #2928
Diffstat (limited to 'tokio/tests')
-rw-r--r-- | tokio/tests/sync_broadcast.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tokio/tests/sync_broadcast.rs b/tokio/tests/sync_broadcast.rs index 7960eb85..84c77a77 100644 --- a/tokio/tests/sync_broadcast.rs +++ b/tokio/tests/sync_broadcast.rs @@ -23,7 +23,7 @@ macro_rules! assert_empty { ($e:expr) => { match $e.try_recv() { Ok(value) => panic!("expected empty; got = {:?}", value), - Err(broadcast::TryRecvError::Empty) => {} + Err(broadcast::error::TryRecvError::Empty) => {} Err(e) => panic!("expected empty; got = {:?}", e), } }; @@ -32,7 +32,7 @@ macro_rules! assert_empty { macro_rules! assert_lagged { ($e:expr, $n:expr) => { match assert_err!($e) { - broadcast::TryRecvError::Lagged(n) => { + broadcast::error::TryRecvError::Lagged(n) => { assert_eq!(n, $n); } _ => panic!("did not lag"), @@ -43,7 +43,7 @@ macro_rules! assert_lagged { macro_rules! assert_closed { ($e:expr) => { match assert_err!($e) { - broadcast::TryRecvError::Closed => {} + broadcast::error::TryRecvError::Closed => {} _ => panic!("did not lag"), } }; @@ -491,6 +491,6 @@ fn lagging_receiver_recovers_after_wrap_open() { assert_empty!(rx); } -fn is_closed(err: broadcast::RecvError) -> bool { - matches!(err, broadcast::RecvError::Closed) +fn is_closed(err: broadcast::error::RecvError) -> bool { + matches!(err, broadcast::error::RecvError::Closed) } |