mirror of https://github.com/rwf2/Rocket.git
Use the '!' type for 'str::FromForm::Error'.
This commit is contained in:
parent
aec2d9ea30
commit
77c51ff43f
|
@ -117,9 +117,9 @@ pub trait FromForm<'f>: Sized {
|
||||||
|
|
||||||
/// This implementation should only be used during debugging!
|
/// This implementation should only be used during debugging!
|
||||||
impl<'f> FromForm<'f> for &'f str {
|
impl<'f> FromForm<'f> for &'f str {
|
||||||
type Error = ();
|
type Error = !;
|
||||||
|
|
||||||
fn from_form(items: &mut FormItems<'f>, _: bool) -> Result<Self, Self::Error> {
|
fn from_form(items: &mut FormItems<'f>, _: bool) -> Result<Self, !> {
|
||||||
items.mark_complete();
|
items.mark_complete();
|
||||||
Ok(items.inner_str())
|
Ok(items.inner_str())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue