Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with deadpool_redis #1

Closed
xerenahmed opened this issue Jun 21, 2023 · 3 comments
Closed

Doesn't work with deadpool_redis #1

xerenahmed opened this issue Jun 21, 2023 · 3 comments

Comments

@xerenahmed
Copy link

xerenahmed commented Jun 21, 2023

I'm using deadpool_redis for asynchronous connection pool. But implementations doesn't fit for this crate.

error[E0277]: the trait bound `Lecture: deadpool_redis::redis::FromRedisValue` is not satisfied
   --> src/graphql/lecture.rs:23:18
    |
23  |                 .query_async(&mut conn)
    |                  ^^^^^^^^^^^ the trait `deadpool_redis::redis::FromRedisValue` is not implemented for `Lecture`
@daniel7grant
Copy link
Owner

I'm not familiar with deadpool_redis, are its traits compatible with the redis crates traits? If they are, the code probably can be copied over from the redis implementation.

@xerenahmed
Copy link
Author

Yes, it re-exports the redis crate with some additional functions of its own.

@daniel7grant
Copy link
Owner

I added a fix in version 0.2.0, so now the macro uses the redis crate in scope. See the documentation and the derive_deadpool example, but most likely this will fix your problem:

use deadpool_redis::redis;

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

No branches or pull requests

2 participants