From 5b8b41bcd8cce536d745ef192888c2bb7bd4049e Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Thu, 3 Nov 2016 19:09:08 +0100 Subject: [PATCH] Fix examples for updates Redirect API. --- examples/extended_validation/src/main.rs | 2 +- examples/forms/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/extended_validation/src/main.rs b/examples/extended_validation/src/main.rs index 4614eacc..22fa9603 100644 --- a/examples/extended_validation/src/main.rs +++ b/examples/extended_validation/src/main.rs @@ -63,7 +63,7 @@ fn login<'a>(user_form: Form<'a, UserLogin<'a>>) -> Result { 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()) } diff --git a/examples/forms/src/main.rs b/examples/forms/src/main.rs index cdb8b989..45b410e1 100644 --- a/examples/forms/src/main.rs +++ b/examples/forms/src/main.rs @@ -28,7 +28,7 @@ fn login<'a>(user_form: Form<'a, UserLogin<'a>>) -> Result { 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 {