Skip to content

Commit

Permalink
Resolve conflict after cherry-pick v3 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DDtKey committed Oct 11, 2021
1 parent 8144133 commit 3eea537
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,10 @@ async fn manual_secure(details: AuthDetails) -> HttpResponse {

You can find more [`examples`] in the git repository folder and [`documentation`].

<<<<<<< HEAD
=======
## Supported `actix-web` versions
* For `actix-web-grants: 2.*` supported version of `actix-web` is `3.*`
* For `actix-web-grants: 3.*` supported version of `actix-web` is `4.*`

>>>>>>> 12c7028 (docs: add 'how to use' section (#18))
[`actix-web-httpauth`]: https://github.com/DDtKey/actix-web-grants/blob/main/examples/jwt-httpauth
[`examples`]: https://github.com/DDtKey/actix-web-grants/tree/main/examples
[`documentation`]: https://docs.rs/actix-web-grants
10 changes: 5 additions & 5 deletions src/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ where
}
}

impl<S, B, T, Req> Transform<S, ServiceRequest> for GrantsMiddleware<T, Req>
impl<S, B, T, Req> Transform<S> for GrantsMiddleware<T, Req>
where
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,
S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,
for<'a> T: PermissionsExtractor<'a, Req> + 'static,
{
type Request = ServiceRequest;
Expand Down Expand Up @@ -113,9 +113,9 @@ where
phantom_req: PhantomData<Req>,
}

impl<S, B, T, Req> Service<ServiceRequest> for GrantsService<S, T, Req>
impl<S, B, T, Req> Service for GrantsService<S, T, Req>
where
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,
S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,
for<'a> T: PermissionsExtractor<'a, Req>,
{
type Request = ServiceRequest;
Expand All @@ -127,7 +127,7 @@ where
self.service.poll_ready(cx)
}

fn call(&self, mut req: ServiceRequest) -> Self::Future {
fn call(&mut self, mut req: ServiceRequest) -> Self::Future {
let service = Rc::clone(&self.service);
let extractor = Rc::clone(&self.extractor);

Expand Down

0 comments on commit 3eea537

Please sign in to comment.