diff --git a/core/codegen/tests/typed-uris.rs b/core/codegen/tests/typed-uris.rs index 4e8cdcb7..ab064dc8 100644 --- a/core/codegen/tests/typed-uris.rs +++ b/core/codegen/tests/typed-uris.rs @@ -427,7 +427,7 @@ struct Third<'r> { #[post("//?&")] fn optionals( foo: Option, - bar: Result, + bar: Option, q1: Result>, rest: Option> ) { } diff --git a/core/lib/src/request/from_param.rs b/core/lib/src/request/from_param.rs index 3cd8fc55..3eca0084 100644 --- a/core/lib/src/request/from_param.rs +++ b/core/lib/src/request/from_param.rs @@ -193,7 +193,7 @@ impl<'a> FromParam<'a> for &'a str { } impl<'a> FromParam<'a> for String { - type Error = &'a str; + type Error = std::convert::Infallible; #[inline(always)] fn from_param(param: &'a str) -> Result {