diff --git a/src/main.rs b/src/main.rs index 81d9857..1a49057 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -use tide::{Request, Response}; +use tide::{http::StatusCode, Request, Response}; #[async_std::main] async fn main() -> tide::Result<()> { @@ -14,7 +14,7 @@ async fn app_setup() -> tide::Server<()> { } async fn home(_req: Request<()>) -> tide::Result { - let mut res = Response::new(200); + let mut res = Response::new(StatusCode::Ok); res.set_body(" @@ -36,6 +36,6 @@ mod basic_tests { async fn home_page_available() { let app = app_setup().await; let response = app.get("/").await.unwrap(); - assert_eq!(response.status(), tide::http::StatusCode::Ok); + assert_eq!(response.status(), StatusCode::Ok); } }