Add must_use attribute to Redirect type (#1356)

This commit is contained in:
Jonas Platte 2022-09-07 13:52:58 +02:00 committed by GitHub
parent b5d4bf236e
commit da4ea4d4c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,6 +19,7 @@ use http::{header::LOCATION, HeaderValue, StatusCode};
/// # hyper::Server::bind(&"".parse().unwrap()).serve(app.into_make_service()).await.unwrap(); /// # hyper::Server::bind(&"".parse().unwrap()).serve(app.into_make_service()).await.unwrap();
/// # }; /// # };
/// ``` /// ```
#[must_use = "needs to be returned from a handler or otherwise turned into a Response to be useful"]
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct Redirect { pub struct Redirect {
status_code: StatusCode, status_code: StatusCode,