Skip to content

Commit

Permalink
clean up assert!(matches!( in encode test
Browse files Browse the repository at this point in the history
  • Loading branch information
jbr committed Jun 29, 2020
1 parent f484fd4 commit 95ddc4b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@ async fn dropping_encoder() -> http_types::Result<()> {

std::mem::drop(reader);

assert!(matches!(sender.send("cat", "chashu", None).await,
Err(e @ async_std::io::Error { .. })
if e.kind() == async_std::io::ErrorKind::ConnectionAborted));
let response = sender.send("cat", "chashu", None).await;
assert!(response.is_err());
assert_eq!(
response.unwrap_err().kind(),
async_std::io::ErrorKind::ConnectionAborted
);
Ok(())
}

0 comments on commit 95ddc4b

Please sign in to comment.