mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-15 00:00:20 +02:00
Add must_use attribute to Redirect type (#1356)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user