Skip to content

Commit 2018545

Browse files
authored
chore(tests): Replace matches crate with std assert and matches macro (#3315)
1 parent 50f123a commit 2018545

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ libc = { version = "0.2", optional = true }
4242
[dev-dependencies]
4343
futures-util = { version = "0.3", default-features = false, features = ["alloc"] }
4444
http-body-util = "=0.1.0-rc.3"
45-
matches = "0.1"
4645
pretty_env_logger = "0.4"
4746
spmc = "0.3"
4847
serde = { version = "1.0", features = ["derive"] }

tests/client.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#![deny(warnings)]
22
#![warn(rust_2018_idioms)]
33

4-
#[macro_use]
5-
extern crate matches;
6-
74
use std::convert::Infallible;
85
use std::fmt;
96
use std::future::Future;
@@ -1781,7 +1778,7 @@ mod conn {
17811778
assert!(!io.shutdown_called, "upgrade shouldn't shutdown AsyncWrite");
17821779
rt.block_on(poll_fn(|ctx| {
17831780
let ready = client.poll_ready(ctx);
1784-
assert_matches!(ready, Poll::Ready(Err(_)));
1781+
assert!(matches!(ready, Poll::Ready(Err(_))));
17851782
ready
17861783
}))
17871784
.unwrap_err();
@@ -1871,7 +1868,7 @@ mod conn {
18711868

18721869
rt.block_on(poll_fn(|ctx| {
18731870
let ready = client.poll_ready(ctx);
1874-
assert_matches!(ready, Poll::Ready(Err(_)));
1871+
assert!(matches!(ready, Poll::Ready(Err(_))));
18751872
ready
18761873
}))
18771874
.unwrap_err();

0 commit comments

Comments
 (0)