Skip to content

Commit 3cf1783

Browse files
authored
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.
1 parent 5723cac commit 3cf1783

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
//!
4949
//! // Or simply test if a request matches (doesn't reject).
5050
//! assert!(
51-
//! !warp::test::request()
51+
//! warp::test::request()
5252
//! .path("/1/-5")
5353
//! .matches(&filter)
5454
//! .await

0 commit comments

Comments
 (0)