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 and 0xE282B0 committed Jan 12, 2024
1 parent 8ee6351 commit 47339f5
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 @@ -47,7 +47,6 @@ wasmedge_wasi_socket = {version = "0.4.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 47339f5

Please sign in to comment.