mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-26 09:08:05 +01:00
Add must_use attribute to Redirect type (#1356)
This commit is contained in:
parent
b5d4bf236e
commit
da4ea4d4c2
1 changed files with 1 additions and 0 deletions
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue