Skip to content

Commit 48bdfb6

Browse files
committed
add From<Vec<&String>> for RedisValue
1 parent be5f3d3 commit 48bdfb6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/redismodule.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ impl From<Vec<String>> for RedisValue {
7474
}
7575
}
7676

77+
impl From<Vec<&String>> for RedisValue {
78+
fn from(strings: Vec<&String>) -> Self {
79+
RedisValue::Array(strings.into_iter().map(|s| RedisValue::BulkString(s.to_string())).collect())
80+
}
81+
}
82+
7783
impl From<Vec<i64>> for RedisValue {
7884
fn from(nums: Vec<i64>) -> Self {
7985
RedisValue::Array(nums.into_iter().map(RedisValue::Integer).collect())

0 commit comments

Comments
 (0)