Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
davidpdrsn committed Jun 27, 2022
1 parent 44bc094 commit c32b19f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions axum-extra/src/extract/cached.rs
Original file line number Diff line number Diff line change
@@ -30,13 +30,13 @@ use std::ops::{Deref, DerefMut};
/// struct Session { /* ... */ }
///
/// #[async_trait]
/// impl<B> FromRequest<B> for Session
/// impl<R, B> FromRequest<R, B> for Session
/// where
/// B: Send,
/// {
/// type Rejection = (StatusCode, String);
///
/// async fn from_request(req: &mut RequestParts<B>) -> Result<Self, Self::Rejection> {
/// async fn from_request(req: &mut RequestParts<R, B>) -> Result<Self, Self::Rejection> {
/// // load session...
/// # unimplemented!()
/// }
@@ -45,13 +45,13 @@ use std::ops::{Deref, DerefMut};
/// struct CurrentUser { /* ... */ }
///
/// #[async_trait]
/// impl<B> FromRequest<B> for CurrentUser
/// impl<R, B> FromRequest<R, B> for CurrentUser
/// where
/// B: Send,
/// {
/// type Rejection = Response;
///
/// async fn from_request(req: &mut RequestParts<B>) -> Result<Self, Self::Rejection> {
/// async fn from_request(req: &mut RequestParts<R, B>) -> Result<Self, Self::Rejection> {
/// // loading a `CurrentUser` requires first loading the `Session`
/// //
/// // by using `Cached<Session>` we avoid extracting the session more than

0 comments on commit c32b19f

Please sign in to comment.