From 3cf17837c40461316a53f91468c30972cf7c7d1c Mon Sep 17 00:00:00 2001 From: Daniel Varga Date: Fri, 12 Aug 2022 18:56:45 +0200 Subject: [PATCH] Fix test example so it doesn't fail (#988) Comment says "Or simply test if a request matches (doesn't reject)" therefore I would expect for assert to test for success. Also this example (for sum) will always match. It's confusing the code example actually tests if it doesn't match. --- src/test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test.rs b/src/test.rs index a656aca43..3c67c34d8 100644 --- a/src/test.rs +++ b/src/test.rs @@ -48,7 +48,7 @@ //! //! // Or simply test if a request matches (doesn't reject). //! assert!( -//! !warp::test::request() +//! warp::test::request() //! .path("/1/-5") //! .matches(&filter) //! .await