From b7746e05673fbb9d5ff26390bc53c536f7b7d0c8 Mon Sep 17 00:00:00 2001 From: tottoto Date: Sun, 17 Sep 2023 20:13:55 +0900 Subject: [PATCH] chore(tests): Replace matches crate with std assert and matches macro (#3315) Signed-off-by: Sven Pfennig --- Cargo.toml | 1 - tests/client.rs | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index bffa60bf7c..f15cb1e93b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] } diff --git a/tests/client.rs b/tests/client.rs index 1d19f8ea1d..b306016eea 100644 --- a/tests/client.rs +++ b/tests/client.rs @@ -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; @@ -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(); @@ -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();