Add must_use attribute to Redirect type (#1356)

This commit is contained in:
Jonas Platte
2022-10-20 20:02:46 +02:00
committed by David Pedersen
parent a6a3b08570
commit d3c5211967
+1
View File
@@ -19,6 +19,7 @@ use http::{header::LOCATION, HeaderValue, StatusCode};
/// # 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)]
pub struct Redirect {
status_code: StatusCode,