This is an automated email from the ASF dual-hosted git repository.

maplefu pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new 4d88a098 Catch up for json-set with multiple values (#1827)
4d88a098 is described below

commit 4d88a098865ec2ef7d10ec4c856dc06073674be4
Author: mwish <[email protected]>
AuthorDate: Mon Oct 16 10:46:29 2023 +0800

    Catch up for json-set with multiple values (#1827)
    
    Co-authored-by: Twice <[email protected]>
---
 src/types/json.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/types/json.h b/src/types/json.h
index d25c20f1..f1fd141e 100644
--- a/src/types/json.h
+++ b/src/types/json.h
@@ -33,7 +33,6 @@ struct JsonValue {
 
   static StatusOr<JsonValue> FromString(std::string_view str) {
     jsoncons::json val;
-
     try {
       val = jsoncons::json::parse(str);
     } catch (const jsoncons::ser_error &e) {
@@ -48,7 +47,7 @@ struct JsonValue {
   Status Set(std::string_view path, JsonValue &&new_value) {
     try {
       jsoncons::jsonpath::json_replace(value, path, [&new_value](const 
std::string & /*path*/, jsoncons::json &origin) {
-        origin = std::move(new_value.value);
+        origin = new_value.value;
       });
     } catch (const jsoncons::jsonpath::jsonpath_error &e) {
       return {Status::NotOK, e.what()};

Reply via email to