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

Commit

Permalink
fmt code
Browse files Browse the repository at this point in the history
  • Loading branch information
gkorland committed Sep 3, 2019
1 parent 89b8a95 commit 3df52be
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ bson = "0.13.0"
serde_json = "1.0"
libc = "0.2"
jsonpath_lib = { git="https://github.com/gkorland/jsonpath.git", branch="reaplce_with_ownership_parser" }
redismodule = { git="https://github.com/redislabsmodules/redismodule-rs.git", branch="load_rdb" }
redismodule = { git="https://github.com/redislabsmodules/redismodule-rs.git", branch="master" }
2 changes: 1 addition & 1 deletion src/backward.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ enum NodeType {
Boolean,
Dict,
Array,
KeyVal,
KeyVal,
// N_DATETIME = 0x100
// N_BINARY = 0x200
}
Expand Down
10 changes: 5 additions & 5 deletions src/redisjson.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
// 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 bson::decode_document;
use crate::backward;
use crate::nodevisitor::NodeVisitorImpl;
use bson::decode_document;
use jsonpath_lib::{JsonPathError, SelectorMut};
use redismodule::raw;
use serde_json::{Map, Value};
Expand Down Expand Up @@ -147,7 +147,7 @@ impl RedisJSON {
data: &str,
path: &str,
option: &SetOptions,
format: Format
format: Format,
) -> Result<bool, Error> {
let json: Value = RedisJSON::parse_str(data, format)?;
if path == "$" {
Expand Down Expand Up @@ -193,7 +193,7 @@ impl RedisJSON {
let results = self.get_doc(path)?;
let res = match format {
Format::JSON => serde_json::to_string(&results)?,
Format::BSON => return Err("Soon to come...".into()) //results.into() as Bson,
Format::BSON => return Err("Soon to come...".into()), //results.into() as Bson,
};
Ok(res)
}
Expand Down Expand Up @@ -346,8 +346,8 @@ impl RedisJSON {
Value::Null => 0,
Value::Bool(v) => mem::size_of_val(v),
Value::Number(v) => mem::size_of_val(v),
Value::String(v) => mem::size_of_val(v),
Value::Array(v) => mem::size_of_val(v),
Value::String(v) => mem::size_of_val(v),
Value::Array(v) => mem::size_of_val(v),
Value::Object(v) => mem::size_of_val(v),
};
Ok(res.into())
Expand Down

0 comments on commit 3df52be

Please sign in to comment.