From 5275d979ad088a2bad562697c2e89a13306aada7 Mon Sep 17 00:00:00 2001 From: Menjanahary Date: Wed, 8 Jan 2025 10:43:55 +0400 Subject: [PATCH] Update README.md Minor refactor of the "Getting started" example --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bc4f987..775c42d 100644 --- a/README.md +++ b/README.md @@ -90,14 +90,14 @@ async fn main() { .await .unwrap() .status(); - assert_eq!(status.as_u16(), 200); + assert_eq!(status, surf::StatusCode::Ok); // If the request doesn't match any `Mock` mounted on our `MockServer` a 404 is returned. let status = surf::get(format!("{}/missing", &mock_server.uri())) .await .unwrap() .status(); - assert_eq!(status.as_u16(), 404); + assert_eq!(status, surf::StatusCode::NotFound); } ```