mirror of
https://github.com/rwf2/Rocket.git
synced 2025-02-07 09:12:09 +00:00
parent
dc1b729f29
commit
4339c2af48
@ -427,7 +427,7 @@ struct Third<'r> {
|
|||||||
#[post("/<foo>/<bar>?<q1>&<rest..>")]
|
#[post("/<foo>/<bar>?<q1>&<rest..>")]
|
||||||
fn optionals(
|
fn optionals(
|
||||||
foo: Option<usize>,
|
foo: Option<usize>,
|
||||||
bar: Result<String, &'_ str>,
|
bar: Option<String>,
|
||||||
q1: Result<usize, Errors<'_>>,
|
q1: Result<usize, Errors<'_>>,
|
||||||
rest: Option<Third<'_>>
|
rest: Option<Third<'_>>
|
||||||
) { }
|
) { }
|
||||||
|
@ -193,7 +193,7 @@ impl<'a> FromParam<'a> for &'a str {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> FromParam<'a> for String {
|
impl<'a> FromParam<'a> for String {
|
||||||
type Error = &'a str;
|
type Error = std::convert::Infallible;
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn from_param(param: &'a str) -> Result<String, Self::Error> {
|
fn from_param(param: &'a str) -> Result<String, Self::Error> {
|
||||||
|
Loading…
Reference in New Issue
Block a user