diff --git a/src/commands.rs b/src/commands.rs index f83708bf9..e4bd051c9 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -831,13 +831,13 @@ implement_commands! { cmd("ZPOPMIN").arg(key).arg(count) } - /// Removes and returns up to count members with the highest scores, + /// Removes and returns up to count members with the highest scores, /// from the first non-empty sorted set in the provided list of key names. fn zmpop_max(keys: &'a [K], count: isize) { cmd("ZMPOP").arg(keys.len()).arg(keys).arg("MAX").arg("COUNT").arg(count) } - /// Removes and returns up to count members with the lowest scores, + /// Removes and returns up to count members with the lowest scores, /// from the first non-empty sorted set in the provided list of key names. fn zmpop_min(keys: &'a [K], count: isize) { cmd("ZMPOP").arg(keys.len()).arg(keys).arg("MIN").arg("COUNT").arg(count) @@ -2216,7 +2216,9 @@ impl ToRedisArgs for LposOptions { /// Enum for the LEFT | RIGHT args used by some commands pub enum Direction { + /// Targets the first element (head) of the list Left, + /// Targets the last element (tail) of the list Right, } diff --git a/src/lib.rs b/src/lib.rs index f90eb2060..635e4a530 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -361,7 +361,7 @@ assert_eq!(result, Ok(("foo".to_string(), b"bar".to_vec()))); // public api pub use crate::client::Client; pub use crate::cmd::{cmd, pack_command, pipe, Arg, Cmd, Iter}; -pub use crate::commands::{Commands, ControlFlow, LposOptions, PubSubCommands}; +pub use crate::commands::{Commands, ControlFlow, Direction, LposOptions, PubSubCommands}; pub use crate::connection::{ parse_redis_url, transaction, Connection, ConnectionAddr, ConnectionInfo, ConnectionLike, IntoConnectionInfo, Msg, PubSub, RedisConnectionInfo,