Accept &str for Redirect (#889)

* Accept &str for Redirect

* Fix doc example

* fix more docs examples

* update changelog

* fix changelog label

Co-authored-by: David Pedersen <[email protected]>
This commit is contained in:
Evan Schwartz
2022-03-31 10:03:06 +02:00
committed by GitHub
co-authored by David Pedersen
parent 79501afd10
commit 3084dc10ca
5 changed files with 20 additions and 47 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ pub use cookie_lib::{Cookie, Key};
/// // the updated jar must be returned for the changes
/// // to be included in the response
/// jar.add(Cookie::new("session_id", session_id)),
/// Redirect::to("/me".parse().unwrap()),
/// Redirect::to("/me"),
/// ))
/// } else {
/// Err(StatusCode::UNAUTHORIZED)
@@ -214,7 +214,7 @@ impl IntoResponse for CookieJar {
/// // the updated jar must be returned for the changes
/// // to be included in the response
/// jar.add(Cookie::new("session_id", session_id)),
/// Redirect::to("/me".parse().unwrap()),
/// Redirect::to("/me"),
/// ))
/// } else {
/// Err(StatusCode::UNAUTHORIZED)