Skip to content

Commit 95ddc4b

Browse files
committed
clean up assert!(matches!( in encode test
1 parent f484fd4 commit 95ddc4b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/encode.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,11 @@ async fn dropping_encoder() -> http_types::Result<()> {
7474

7575
std::mem::drop(reader);
7676

77-
assert!(matches!(sender.send("cat", "chashu", None).await,
78-
Err(e @ async_std::io::Error { .. })
79-
if e.kind() == async_std::io::ErrorKind::ConnectionAborted));
77+
let response = sender.send("cat", "chashu", None).await;
78+
assert!(response.is_err());
79+
assert_eq!(
80+
response.unwrap_err().kind(),
81+
async_std::io::ErrorKind::ConnectionAborted
82+
);
8083
Ok(())
8184
}

0 commit comments

Comments
 (0)