object_storage_endpoint_param: Make it formattable for real

Currently the formatter converts it to json and then tries to emit into
the output context with the "...{{}}" format string. The intent was to
have the "...{<json text>}" output. However, the double curly brace in
format string means "print a curly brace", so the output of the above
formatting is "...{}", literally.

Fix by keeping a single curly brace. The "<json text>" thing will have
its own surrounding curly braces.

Fixes #27718

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>

Closes scylladb/scylladb#27687
This commit is contained in:
Pavel Emelyanov
2025-12-16 13:40:42 +03:00
committed by Patryk Jędrzejczak
parent 0bfd07a268
commit a6618f225c

View File

@@ -135,5 +135,5 @@ const std::string db::object_storage_endpoint_param::gs_type = "gs";
auto fmt::formatter<db::object_storage_endpoint_param>::format(const db::object_storage_endpoint_param& e, fmt::format_context& ctx) const
-> decltype(ctx.out()) {
return fmt::format_to(ctx.out(), "object_storage_endpoint_param{{}}", e.to_json_string());
return fmt::format_to(ctx.out(), "object_storage_endpoint_param{}", e.to_json_string());
}