Skip to content

Commit

Permalink
chore(tests): Replace matches crate with std assert and matches macro (
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored Sep 17, 2023
1 parent 50f123a commit 2018545
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ libc = { version = "0.2", optional = true }
[dev-dependencies]
futures-util = { version = "0.3", default-features = false, features = ["alloc"] }
http-body-util = "=0.1.0-rc.3"
matches = "0.1"
pretty_env_logger = "0.4"
spmc = "0.3"
serde = { version = "1.0", features = ["derive"] }
Expand Down
7 changes: 2 additions & 5 deletions tests/client.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#![deny(warnings)]
#![warn(rust_2018_idioms)]

#[macro_use]
extern crate matches;

use std::convert::Infallible;
use std::fmt;
use std::future::Future;
Expand Down Expand Up @@ -1781,7 +1778,7 @@ mod conn {
assert!(!io.shutdown_called, "upgrade shouldn't shutdown AsyncWrite");
rt.block_on(poll_fn(|ctx| {
let ready = client.poll_ready(ctx);
assert_matches!(ready, Poll::Ready(Err(_)));
assert!(matches!(ready, Poll::Ready(Err(_))));
ready
}))
.unwrap_err();
Expand Down Expand Up @@ -1871,7 +1868,7 @@ mod conn {

rt.block_on(poll_fn(|ctx| {
let ready = client.poll_ready(ctx);
assert_matches!(ready, Poll::Ready(Err(_)));
assert!(matches!(ready, Poll::Ready(Err(_))));
ready
}))
.unwrap_err();
Expand Down

0 comments on commit 2018545

Please sign in to comment.