From 4339c2af4861b4c95b9c2648f74b0d730ca40118 Mon Sep 17 00:00:00 2001 From: PROgrm_JARvis Date: Fri, 11 Jun 2021 17:42:04 +0300 Subject: [PATCH] Make '::Error' 'Infallible'. Fixes #1679. --- core/codegen/tests/typed-uris.rs | 2 +- core/lib/src/request/from_param.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 {