2
我使用锈试图访问Redis的以下内容:的参数个数错误使用MGET与Redis的-RS时
extern crate redis;
use redis::{Client, Commands, Connection, RedisResult};
fn main() {
let redis_client = Client::open("redis://127.0.0.1/").unwrap();
let redis_conn = redis_client.get_connection().unwrap();
let mut keys_to_get = vec![];
keys_to_get.push("random_key_1".to_string());
keys_to_get.push("random_key_2".to_string());
let redis_result: String = redis_conn.get(keys_to_get).unwrap();
}
当我运行cargo run
我得到:
Running `target/debug/test_resdis`
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: An error was signalled by the server: wrong number of arguments for 'get' command', ../src/libcore/result.rs:746
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: Process didn't exit successfully: `target/debug/test_resdis` (exit code: 101)
上午我做错了什么,或者它是一个错误?
它在这里:https://github.com/mitsuhiko/redis-rs/issues/95谢谢你的支持。 – cmedeiros
mitsuhiko(redis-rs创建者)已经修复了它,并且应该在下一个版本中 – cmedeiros