Example doesn't work: no method named `incr` found for type
wisespace-io opened this issue · 2 comments
wisespace-io commented
error: no method named incr
found for type r2d2::PooledConnection<r2d2_redis::RedisConnectionManager>
in the current scope
--> src/main.rs:23:31
|
23 | let n: i64 = conn.incr("counter", 1).unwrap();
| ^^^^
|
= help: items from traits can only be used if the trait is in scope; the following trait is implemented but not in scope, perhaps add a use
for it:
= help: candidate #1: use redis::commands::Commands
Note:
--- Builds if I use Redis 0.6
--- Doesn't build if I use Redis 0.7
sorccu commented
Seems like 0.7 was only available in master. I've now published 0.5.0, could you try that and close the ticket if it works?
wisespace-io commented
Yes, it works now. Thank you.