Skip to content

Commit

Permalink
Implement From<bool> for RedisValue. (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
MeirShpilraien authored May 22, 2023
1 parent b0939e7 commit 576e20d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/redisvalue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ impl From<i64> for RedisValue {
}
}

impl From<bool> for RedisValue {
fn from(b: bool) -> Self {
Self::Bool(b)
}
}

impl From<usize> for RedisValue {
fn from(i: usize) -> Self {
(i as i64).into()
Expand Down

0 comments on commit 576e20d

Please sign in to comment.