Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
55e5ea9
placeholder
ephraimfeldblum Aug 8, 2024
8dd5acc
work
ephraimfeldblum Aug 8, 2024
3b9eb5a
refactor
ephraimfeldblum Aug 11, 2024
1eb8567
into_both
ephraimfeldblum Aug 12, 2024
ca90719
some work on `do_op`
ephraimfeldblum Aug 13, 2024
2e108b9
delete useless test output
ephraimfeldblum Aug 13, 2024
d9ec32c
and arr_pop too
ephraimfeldblum Aug 13, 2024
7e9456e
do_op cannot reach the case where op_fun returns Ok(None) as none of …
ephraimfeldblum Aug 13, 2024
be1fa94
manage case where path is invalid
ephraimfeldblum Aug 13, 2024
e05eca6
work
ephraimfeldblum Aug 15, 2024
6b89dbe
ridding unwraps
ephraimfeldblum Aug 18, 2024
7637971
mset is concerning
ephraimfeldblum Aug 19, 2024
a949ea8
further reducing complexity
ephraimfeldblum Aug 19, 2024
3e576d4
work
ephraimfeldblum Aug 20, 2024
38b2211
simplify error handling
ephraimfeldblum Aug 20, 2024
4e1d180
.
ephraimfeldblum Aug 20, 2024
59af235
code dupe
ephraimfeldblum Aug 20, 2024
21779ba
hoist loop invariant
ephraimfeldblum Aug 20, 2024
3889230
ownership
ephraimfeldblum Aug 20, 2024
24951dc
and_then(Ok()) should be map()
ephraimfeldblum Aug 20, 2024
6d50274
ownership
ephraimfeldblum Aug 21, 2024
3343446
.
ephraimfeldblum Aug 21, 2024
4ecbe57
dedup
ephraimfeldblum Aug 21, 2024
e63af1e
update and replace are the same thing
ephraimfeldblum Aug 21, 2024
27822b5
removing dead code
ephraimfeldblum Aug 22, 2024
eb70f71
readability
ephraimfeldblum Aug 22, 2024
bf5cb8b
strong typing is good, why use enums where they're not needed
ephraimfeldblum Aug 22, 2024
3018e35
reduce number of wheels needing reinvention
ephraimfeldblum Aug 25, 2024
dd1e325
PathTracker is driving me insane
ephraimfeldblum Aug 25, 2024
a78b5b6
.
ephraimfeldblum Aug 26, 2024
db1ac87
remove test from refactoring
ephraimfeldblum Aug 26, 2024
93a4510
removing dead loc to make codecov happy
ephraimfeldblum Aug 26, 2024
b2a1505
fmt
ephraimfeldblum Aug 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fmt
  • Loading branch information
ephraimfeldblum committed Aug 26, 2024
commit b2a150572c08c4151b954c4d22f0046af83a5ff3
2 changes: 1 addition & 1 deletion redis_json/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl From<&str> for Error {
Self { msg: e.to_string() }
}
}

impl From<serde_json::Error> for Error {
fn from(e: serde_json::Error) -> Self {
Self { msg: e.to_string() }
Expand Down
7 changes: 2 additions & 5 deletions redis_json/src/redisjson.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// User-provided JSON is converted to a tree. This tree is stored transparently in Redis.
// It can be operated on (e.g. INCR) and serialized back to JSON.

use redis_module::{raw, RedisResult, RedisError};
use redis_module::{raw, RedisError, RedisResult};

use std::os::raw::{c_int, c_void};

Expand Down Expand Up @@ -188,7 +188,7 @@
fn into_both(self) -> Result<S, F> {
match self {
Ok(ok) => Ok(ok.into()),
Err(e) => Err(e.into()),

Check warning on line 191 in redis_json/src/redisjson.rs

View check run for this annotation

Codecov / codecov/patch

redis_json/src/redisjson.rs#L191

Added line #L191 was not covered by tests
}
}
}
Expand All @@ -215,10 +215,7 @@
}

#[allow(non_snake_case, unused)]
pub fn value_rdb_load_json(
rdb: *mut raw::RedisModuleIO,
encver: c_int,
) -> RedisResult<String> {
pub fn value_rdb_load_json(rdb: *mut raw::RedisModuleIO, encver: c_int) -> RedisResult<String> {
Ok(match encver {
0 => {
let v = backward::json_rdb_load(rdb)?;
Expand Down
Loading