Skip to content

Commit 3df52be

Browse files
committed
fmt code
1 parent 89b8a95 commit 3df52be

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Cargo.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ bson = "0.13.0"
1212
serde_json = "1.0"
1313
libc = "0.2"
1414
jsonpath_lib = { git="https://github.com/gkorland/jsonpath.git", branch="reaplce_with_ownership_parser" }
15-
redismodule = { git="https://github.com/redislabsmodules/redismodule-rs.git", branch="load_rdb" }
15+
redismodule = { git="https://github.com/redislabsmodules/redismodule-rs.git", branch="master" }

src/backward.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ enum NodeType {
1313
Boolean,
1414
Dict,
1515
Array,
16-
KeyVal,
16+
KeyVal,
1717
// N_DATETIME = 0x100
1818
// N_BINARY = 0x200
1919
}

src/redisjson.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
// User-provided JSON is converted to a tree. This tree is stored transparently in Redis.
55
// It can be operated on (e.g. INCR) and serialized back to JSON.
66

7-
use bson::decode_document;
87
use crate::backward;
98
use crate::nodevisitor::NodeVisitorImpl;
9+
use bson::decode_document;
1010
use jsonpath_lib::{JsonPathError, SelectorMut};
1111
use redismodule::raw;
1212
use serde_json::{Map, Value};
@@ -147,7 +147,7 @@ impl RedisJSON {
147147
data: &str,
148148
path: &str,
149149
option: &SetOptions,
150-
format: Format
150+
format: Format,
151151
) -> Result<bool, Error> {
152152
let json: Value = RedisJSON::parse_str(data, format)?;
153153
if path == "$" {
@@ -193,7 +193,7 @@ impl RedisJSON {
193193
let results = self.get_doc(path)?;
194194
let res = match format {
195195
Format::JSON => serde_json::to_string(&results)?,
196-
Format::BSON => return Err("Soon to come...".into()) //results.into() as Bson,
196+
Format::BSON => return Err("Soon to come...".into()), //results.into() as Bson,
197197
};
198198
Ok(res)
199199
}
@@ -346,8 +346,8 @@ impl RedisJSON {
346346
Value::Null => 0,
347347
Value::Bool(v) => mem::size_of_val(v),
348348
Value::Number(v) => mem::size_of_val(v),
349-
Value::String(v) => mem::size_of_val(v),
350-
Value::Array(v) => mem::size_of_val(v),
349+
Value::String(v) => mem::size_of_val(v),
350+
Value::Array(v) => mem::size_of_val(v),
351351
Value::Object(v) => mem::size_of_val(v),
352352
};
353353
Ok(res.into())

0 commit comments

Comments
 (0)