diff --git a/viz-core/src/from_request.rs b/viz-core/src/from_request.rs index 9d6d29e1..32f26c48 100644 --- a/viz-core/src/from_request.rs +++ b/viz-core/src/from_request.rs @@ -1,6 +1,4 @@ -//! Extracts data from the [Request] by types. - -use std::convert::Infallible; +//! Extracts data from the [`Request`] by types. use crate::{async_trait, IntoResponse, Request}; @@ -19,9 +17,8 @@ impl FromRequest for Option where T: FromRequest, { - type Error = Infallible; + type Error = std::convert::Infallible; - #[inline] async fn extract(req: &mut Request) -> Result { Ok(T::extract(req).await.ok()) } @@ -32,9 +29,8 @@ impl FromRequest for Result where T: FromRequest, { - type Error = Infallible; + type Error = std::convert::Infallible; - #[inline] async fn extract(req: &mut Request) -> Result { Ok(T::extract(req).await) }