Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
wsehjk committed Feb 14, 2024
1 parent 3d45408 commit 6630f75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/commands/cmd_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ class CommandDebug : public Commander {
redis::BulkString("key:123"),
redis::Integer(90),
});
} else if (protocol_type_ == "verbatim") { // verbatim string
} else if (protocol_type_ == "verbatim") { // verbatim string
*output = conn->VerbatimString("txt", "verbatim string");
} else {
*output = redis::Error(
Expand Down
5 changes: 3 additions & 2 deletions src/server/redis_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ class Connection : public EvbufCallbackBase<Connection> {
}
// type should be "txt" or "mkd"
// if RESP is V2, treat verbatim string as blob string
std::string VerbatimString(const std::string& type, const std::string& data) const {
return protocol_version_ == RESP::v3 ? "=" + std::to_string(3+data.size()) + CRLF + type + ":" + data + CRLF : BulkString(data);
std::string VerbatimString(const std::string &type, const std::string &data) const {
return protocol_version_ == RESP::v3 ? "=" + std::to_string(3 + data.size()) + CRLF + type + ":" + data + CRLF
: BulkString(data);
}
std::string NilString() const { return redis::NilString(protocol_version_); }
std::string NilArray() const { return protocol_version_ == RESP::v3 ? "_" CRLF : "*-1" CRLF; }
Expand Down

0 comments on commit 6630f75

Please sign in to comment.