Skip to content
This repository has been archived by the owner on Feb 18, 2020. It is now read-only.

error #4

Closed
AlbanMinassian opened this issue Dec 31, 2017 · 1 comment
Closed

error #4

AlbanMinassian opened this issue Dec 31, 2017 · 1 comment

Comments

@AlbanMinassian
Copy link

AlbanMinassian commented Dec 31, 2017

i have alway error in another projet

git clone https://github.com/ami44/tmp-actix-web-redis.git + cargo run display

 --> src/main.rs:40:25
   |
40 |             .middleware(middleware::SessionStorage::new(
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `actix_web::middleware::SessionBackend<_>` is not implemented for `actix_redis::RedisSessionBackend`
   |
   = note: required by `<actix_web::middleware::SessionStorage<T, S>>::new`

error[E0277]: the trait bound `actix_redis::RedisSessionBackend: actix_web::middleware::SessionBackend<()>` is not satisfied
  --> src/main.rs:40:14
   |
40 |             .middleware(middleware::SessionStorage::new(
   |              ^^^^^^^^^^ the trait `actix_web::middleware::SessionBackend<()>` is not implemented for `actix_redis::RedisSessionBackend`
   |
   = note: required because of the requirements on the impl of `actix_web::middleware::Middleware<()>` for `actix_web::middleware::SessionStorage<actix_redis::RedisSessionBackend, ()>`

@fafhrd91
Copy link
Member

this issue is related to how rust handle different versions of packages. technically in your package
you have two different versions of actix-web package and SessionBackend is different.

just use git dependencies

actix-web = { git = "https://github.com/actix/actix-web" }
actix-redis = { git = "https://github.com/actix/actix-redis" }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants