Skip to content

Commit

Permalink
Add must_use attribute to Redirect type (#1356)
Browse files Browse the repository at this point in the history
  • Loading branch information
jplatte committed Sep 7, 2022
1 parent b5d4bf2 commit da4ea4d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions axum/src/response/redirect.rs
Expand Up @@ -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,
Expand Down

0 comments on commit da4ea4d

Please sign in to comment.