We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6334b0 commit cc69f10Copy full SHA for cc69f10
src/redisjson.rs
@@ -63,7 +63,8 @@ impl RedisJSON {
63
}
64
65
pub fn delete_path(&mut self, path: &str) -> Result<usize, Error> {
66
- self.data = jsonpath_lib::delete(self.data.clone(), path)?;
+ let current_value = mem::replace(&mut self.data, Value::Null);
67
+ self.data = jsonpath_lib::delete(current_value, path)?;
68
69
let res : usize = match self.data {
70
Value::Null => 0,
0 commit comments