mirror of https://github.com/rwf2/Rocket.git
parent
dc1b729f29
commit
4339c2af48
|
@ -427,7 +427,7 @@ struct Third<'r> {
|
|||
#[post("/<foo>/<bar>?<q1>&<rest..>")]
|
||||
fn optionals(
|
||||
foo: Option<usize>,
|
||||
bar: Result<String, &'_ str>,
|
||||
bar: Option<String>,
|
||||
q1: Result<usize, Errors<'_>>,
|
||||
rest: Option<Third<'_>>
|
||||
) { }
|
||||
|
|
|
@ -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<String, Self::Error> {
|
||||
|
|
Loading…
Reference in New Issue