casbin-rs / actix-casbin-auth

Casbin Actix-web access control middleware

Home Page:https://github.com/casbin/casbin-rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bump actix-web to 4.0

hackerchai opened this issue · comments

As well as support of tokio 1.0

Hey I updated actix-web to 4.0.0-beta.1 in the Cargo.toml file,
actix-web = { version = "4.0.0-beta.1", default-features = false }

But then the tests fail:

error[E0277]: the trait bound `CasbinService: actix_web::dev::Transform<actix_web::app_service::AppRouting, ServiceRequest>` is not satisfied
  --> tests/test_middleware.rs:90:19
   |
90 |             .wrap(casbin_middleware.clone())
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `actix_web::dev::Transform<actix_web::app_service::AppRouting, ServiceRequest>` is not implemented for `CasbinService`

error[E0277]: the trait bound `FakeAuth: actix_web::dev::Transform<<impl actix_service::ServiceFactory<ServiceRequest> as actix_service::ServiceFactory<ServiceRequest>>::Service, ServiceRequest>` is not satisfied
  --> tests/test_middleware.rs:91:19
   |
91 |             .wrap(FakeAuth)
   |                   ^^^^^^^^ the trait `actix_web::dev::Transform<<impl actix_service::ServiceFactory<ServiceRequest> as actix_service::ServiceFactory<ServiceRequest>>::Service, ServiceRequest>` is not implemented for `FakeAuth`

Couldn't find actix_web::app_service::AppRouting and ServiceRequest is implemented as a type. What could possibly be the problem here?

Hey I updated actix-web to 4.0.0-beta.1 in the Cargo.toml file,
actix-web = { version = "4.0.0-beta.1", default-features = false }

But then the tests fail:

error[E0277]: the trait bound `CasbinService: actix_web::dev::Transform<actix_web::app_service::AppRouting, ServiceRequest>` is not satisfied
  --> tests/test_middleware.rs:90:19
   |
90 |             .wrap(casbin_middleware.clone())
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `actix_web::dev::Transform<actix_web::app_service::AppRouting, ServiceRequest>` is not implemented for `CasbinService`

error[E0277]: the trait bound `FakeAuth: actix_web::dev::Transform<<impl actix_service::ServiceFactory<ServiceRequest> as actix_service::ServiceFactory<ServiceRequest>>::Service, ServiceRequest>` is not satisfied
  --> tests/test_middleware.rs:91:19
   |
91 |             .wrap(FakeAuth)
   |                   ^^^^^^^^ the trait `actix_web::dev::Transform<<impl actix_service::ServiceFactory<ServiceRequest> as actix_service::ServiceFactory<ServiceRequest>>::Service, ServiceRequest>` is not implemented for `FakeAuth`

Couldn't find actix_web::app_service::AppRouting and ServiceRequest is implemented as a type. What could possibly be the problem here?

@smrpn You can refer the doc of actix-web, see what's the breaking change in actix-web 4.0

@hsluoyz

Hi!
Any news about bump actix-web to 4.0?
"4.0.0-beta.8" is already done.