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