mirror of
https://github.com/tokio-rs/axum.git
synced 2025-09-28 05:20:46 +00:00
Add must_use attribute to Redirect type (#1356)
This commit is contained in:
parent
b5d4bf236e
commit
da4ea4d4c2
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user