Skip to content
This repository was archived by the owner on Apr 20, 2020. It is now read-only.

Commit de4df2c

Browse files
authored
change REDIS_OK to Ok(().into()) on no action
1 parent 2abe958 commit de4df2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ fn json_set(ctx: &Context, args: Vec<String>) -> RedisResult {
3737
let current = key.get_value::<RedisJSON>(&REDIS_JSON_TYPE)?;
3838

3939
match (current, set_option) {
40-
(Some(_), Some(SetOptions::NotExists)) => REDIS_OK,
40+
(Some(_), Some(SetOptions::NotExists)) => Ok(().into()),
4141
(Some(ref mut doc), _) => {
4242
doc.set_value(&value)?;
4343
REDIS_OK
4444
}
45-
(None, Some(SetOptions::AlreadyExists)) => REDIS_OK,
45+
(None, Some(SetOptions::AlreadyExists)) => Ok(().into()),
4646
(None, _) => {
4747
let doc = RedisJSON::from_str(&value)?;
4848
key.set_value(&REDIS_JSON_TYPE, doc)?;

0 commit comments

Comments
 (0)