Skip to content

Commit

Permalink
Fix examples for updates Redirect API.
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioBenitez committed Nov 3, 2016
1 parent dd03033 commit 5b8b41b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/extended_validation/src/main.rs
Expand Up @@ -63,7 +63,7 @@ fn login<'a>(user_form: Form<'a, UserLogin<'a>>) -> Result<Redirect, String> {

if user.username == "Sergio" {
if let Ok(StrongPassword("password")) = user.password {
Ok(Redirect::other("/user/Sergio"))
Ok(Redirect::to("/user/Sergio"))
} else {
Err("Wrong password!".to_string())
}
Expand Down
2 changes: 1 addition & 1 deletion examples/forms/src/main.rs
Expand Up @@ -28,7 +28,7 @@ fn login<'a>(user_form: Form<'a, UserLogin<'a>>) -> Result<Redirect, String> {

if user.username == "Sergio" {
match user.password {
"password" => Ok(Redirect::other("/user/Sergio")),
"password" => Ok(Redirect::to("/user/Sergio")),
_ => Err("Wrong password!".to_string())
}
} else {
Expand Down

0 comments on commit 5b8b41b

Please sign in to comment.