< 返回版块

tokyohuang123 发表于 2021-08-22 22:26

Tags:web,redis

error[E0308]: mismatched types --> src/routers/user.rs:63:70 | 63 | let checkkey:Result<actix_redis::RespValue> = redis.send(Command(resp_array!["get",&item.username])).await.unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum actix_redis::RespValue, found enum redis_async::resp::RespValue | = note: perhaps two different versions of crate redis_async are being used? = note: this error originates in the macro resp_array (in Nightly builds, run with -Z macro-backtrace for more info)

从6.0试到了最新 都不行 但是奇怪我公司电脑就会报错

评论区

写评论
作者 tokyohuang123 2021-08-23 08:59

我看了下公司mbp的版本1.5.0。这个版本就没问题

作者 tokyohuang123 2021-08-22 22:36

版本差的多还会出现这个问题 error[E0277]: the trait bound RedisActor: Actor is not satisfied --> src/routers/user.rs:58:12 | 58 | redis: web::Data<Addr>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait Actor is not implemented for RedisActor | ::: /Users/star/.cargo/registry/src/github.com-1ecc6299db9ec823/actix-0.10.0/src/address/mod.rs:72:20 | 72 | pub struct Addr<A: Actor> { | ----- required by this bound in Addr

1 共 2 条评论, 1 页