From 02d7d73f41c4e6ca4e4ccdb93a7c9b6808944da8 Mon Sep 17 00:00:00 2001 From: AntiTopQuark Date: Wed, 24 Jan 2024 00:01:00 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=90=9E=20fix(debug=20command):=20upda?= =?UTF-8?q?te=20err=20msg=20`int`=20->=20`integer`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/apache/kvrocks/issues/2045 --- src/commands/cmd_server.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/cmd_server.cc b/src/commands/cmd_server.cc index c86a152c07b..51f48b549a5 100644 --- a/src/commands/cmd_server.cc +++ b/src/commands/cmd_server.cc @@ -633,7 +633,7 @@ class CommandDebug : public Commander { *output = conn->NilString(); } else { *output = redis::Error( - "Wrong protocol type name. Please use one of the following: string|int|array|set|bignum|true|false|null"); + "Wrong protocol type name. Please use one of the following: string|integer|array|set|bignum|true|false|null"); } } else { return {Status::RedisInvalidCmd, "Unknown subcommand, should be DEBUG or PROTOCOL"}; From 864c4f120da2de0f70461e3887a33dfe882f813f Mon Sep 17 00:00:00 2001 From: AntiTopQuark Date: Wed, 24 Jan 2024 00:48:29 +0800 Subject: [PATCH 2/3] update fmt --- src/commands/cmd_server.cc | 3 ++- src/common/status.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/cmd_server.cc b/src/commands/cmd_server.cc index 51f48b549a5..45a6aeaf9bc 100644 --- a/src/commands/cmd_server.cc +++ b/src/commands/cmd_server.cc @@ -633,7 +633,8 @@ class CommandDebug : public Commander { *output = conn->NilString(); } else { *output = redis::Error( - "Wrong protocol type name. Please use one of the following: string|integer|array|set|bignum|true|false|null"); + "Wrong protocol type name. Please use one of the following: " + "string|integer|array|set|bignum|true|false|null"); } } else { return {Status::RedisInvalidCmd, "Unknown subcommand, should be DEBUG or PROTOCOL"}; diff --git a/src/common/status.h b/src/common/status.h index 37eae9d8281..a03dd46420c 100644 --- a/src/common/status.h +++ b/src/common/status.h @@ -168,7 +168,7 @@ struct StringInStatusOr> : StringInStatusOr(StringInStatusOr&& v) : BaseType(new std::string(*std::move(v))) {} // NOLINT template ::inplace, int> = 0> StringInStatusOr(StringInStatusOr&& v) // NOLINT - : BaseType((typename StringInStatusOr::BaseType &&)(std::move(v))) {} + : BaseType((typename StringInStatusOr::BaseType&&)(std::move(v))) {} StringInStatusOr(const StringInStatusOr& v) = delete; From e66adb1411a4a96ec25db4dc5bb855b0e7dea2cd Mon Sep 17 00:00:00 2001 From: mwish Date: Wed, 24 Jan 2024 01:17:47 +0800 Subject: [PATCH 3/3] Update src/common/status.h --- src/common/status.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/status.h b/src/common/status.h index a03dd46420c..37eae9d8281 100644 --- a/src/common/status.h +++ b/src/common/status.h @@ -168,7 +168,7 @@ struct StringInStatusOr> : StringInStatusOr(StringInStatusOr&& v) : BaseType(new std::string(*std::move(v))) {} // NOLINT template ::inplace, int> = 0> StringInStatusOr(StringInStatusOr&& v) // NOLINT - : BaseType((typename StringInStatusOr::BaseType&&)(std::move(v))) {} + : BaseType((typename StringInStatusOr::BaseType &&)(std::move(v))) {} StringInStatusOr(const StringInStatusOr& v) = delete;