diff --git a/examples/forms/src/tests.rs b/examples/forms/src/tests.rs index 1e0ccb89..8e39f53c 100644 --- a/examples/forms/src/tests.rs +++ b/examples/forms/src/tests.rs @@ -13,7 +13,7 @@ fn test_login(username: &str, password: &str, age: isize, status: Status, let mut response = req.dispatch_with(&rocket); let body_str = response.body().and_then(|body| body.into_string()); - println!("Checking: {:?}/{:?}", username, password); + println!("Checking: {:?}/{:?}/{:?}/{:?}", username, password, age, body_str); assert_eq!(response.status(), status); if let Some(string) = body { diff --git a/lib/src/request/form/from_form_value.rs b/lib/src/request/form/from_form_value.rs index 218badb4..012d2b94 100644 --- a/lib/src/request/form/from_form_value.rs +++ b/lib/src/request/form/from_form_value.rs @@ -74,8 +74,7 @@ impl<'v> FromFormValue<'v> for String { // This actually parses the value according to the standard. fn from_form_value(v: &'v str) -> Result { let replaced = v.replace("+", " "); - let result = URI::percent_decode(replaced.as_bytes()); - match result { + match URI::percent_decode(replaced.as_bytes()) { Err(_) => Err(v), Ok(string) => Ok(string.into_owned()) }