Skip to content

Commit

Permalink
transport: fix enum-class which is no longer printable by fmt
Browse files Browse the repository at this point in the history
Starting with version 8.1 of fmt, one can no longer print an enum
class and assume automatic conversion to the integer underlying type.
See fmtlib/fmt#1841 for this change.

In this patch we fix the one place where we assumed this implicit
conversion works, and make the conversion explicit.

Fixes scylladb#10884

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
  • Loading branch information
nyh committed Jun 26, 2022
1 parent f2bb676 commit a10b9eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transport/cql_protocol_extension.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ std::vector<seastar::sstring> additional_options_for_proto_ext(cql_protocol_exte
case cql_protocol_extension::LWT_ADD_METADATA_MARK:
return {format("LWT_OPTIMIZATION_META_BIT_MASK={:d}", cql3::prepared_metadata::LWT_FLAG_MASK)};
case cql_protocol_extension::RATE_LIMIT_ERROR:
return {format("ERROR_CODE={:d}", exceptions::exception_code::RATE_LIMIT_ERROR)};
return {format("ERROR_CODE={:d}", (int)exceptions::exception_code::RATE_LIMIT_ERROR)};
default:
return {};
}
Expand Down

0 comments on commit a10b9eb

Please sign in to comment.