diff --git a/gms/application_state.cc b/gms/application_state.cc index 3243678c38..d3674f6c3a 100644 --- a/gms/application_state.cc +++ b/gms/application_state.cc @@ -41,11 +41,6 @@ static const std::map application_state_names = { {application_state::SNITCH_NAME, "SNITCH_NAME"}, }; -std::ostream& operator<<(std::ostream& os, const application_state& m) { - fmt::print(os, "{}", m); - return os; -} - } auto fmt::formatter::format(gms::application_state m, diff --git a/gms/application_state.hh b/gms/application_state.hh index 6dc57a9be4..de0c2b5fa5 100644 --- a/gms/application_state.hh +++ b/gms/application_state.hh @@ -10,7 +10,6 @@ #pragma once -#include #include namespace gms { @@ -41,8 +40,6 @@ enum class application_state { SNITCH_NAME, }; -std::ostream& operator<<(std::ostream& os, const application_state& m); - } template <> diff --git a/gms/endpoint_state.cc b/gms/endpoint_state.cc index 3535af5a82..94b5389ed0 100644 --- a/gms/endpoint_state.cc +++ b/gms/endpoint_state.cc @@ -36,11 +36,6 @@ const versioned_value* endpoint_state::get_application_state_ptr(application_sta } } -std::ostream& operator<<(std::ostream& os, const endpoint_state& x) { - fmt::print(os, "{}", x); - return os; -} - bool endpoint_state::is_cql_ready() const noexcept { auto* app_state = get_application_state_ptr(application_state::RPC_READY); if (!app_state) { diff --git a/gms/endpoint_state.hh b/gms/endpoint_state.hh index 10b545b426..bd54d8d383 100644 --- a/gms/endpoint_state.hh +++ b/gms/endpoint_state.hh @@ -162,8 +162,6 @@ public: friend fmt::formatter; }; -std::ostream& operator<<(std::ostream& os, const endpoint_state& x); - using endpoint_state_ptr = lw_shared_ptr; inline endpoint_state_ptr make_endpoint_state_ptr(const endpoint_state& eps) { diff --git a/gms/gossiper.cc b/gms/gossiper.cc index 67923f6868..648b7b5c26 100644 --- a/gms/gossiper.cc +++ b/gms/gossiper.cc @@ -2721,11 +2721,6 @@ locator::token_metadata_ptr gossiper::get_token_metadata_ptr() const noexcept { return _shared_token_metadata.get(); } -std::ostream& operator<<(std::ostream& os, const loaded_endpoint_state& st) { - fmt::print(os, "{}", st); - return os; -} - } // namespace gms auto fmt::formatter::format(const gms::loaded_endpoint_state& st, fmt::format_context& ctx) const -> decltype(ctx.out()) { diff --git a/gms/gossiper.hh b/gms/gossiper.hh index f9d1cfee7f..5048890908 100644 --- a/gms/gossiper.hh +++ b/gms/gossiper.hh @@ -82,8 +82,6 @@ struct loaded_endpoint_state { std::optional opt_status; }; -std::ostream& operator<<(std::ostream& os, const loaded_endpoint_state& st); - /** * This module is responsible for Gossiping information for the local endpoint. This abstraction * maintains the list of live and dead endpoints. Periodically i.e. every 1 second this module diff --git a/gms/inet_address.cc b/gms/inet_address.cc index b3c2186a60..c8ff9d6c3d 100644 --- a/gms/inet_address.cc +++ b/gms/inet_address.cc @@ -31,8 +31,3 @@ future gms::inet_address::lookup(sstring name, opt_family fam return gms::inet_address(h.addr_list.front()); }); } - -std::ostream& gms::operator<<(std::ostream& os, const inet_address& x) { - fmt::print(os, "{}", x); - return os; -} diff --git a/gms/inet_address.hh b/gms/inet_address.hh index b5655b9954..0dc7766b2b 100644 --- a/gms/inet_address.hh +++ b/gms/inet_address.hh @@ -73,8 +73,6 @@ public: static future lookup(sstring, opt_family family = {}, opt_family preferred = {}); }; -std::ostream& operator<<(std::ostream& os, const inet_address& x); - } namespace std { diff --git a/gms/versioned_value.hh b/gms/versioned_value.hh index 694ed2d468..a772fb5997 100644 --- a/gms/versioned_value.hh +++ b/gms/versioned_value.hh @@ -201,11 +201,4 @@ template <> struct fmt::formatter : fmt::formatter + #include #include #include @@ -16,11 +19,9 @@ #include "types/types.hh" #include "gms/inet_address.hh" #include "gms/inet_address_serializer.hh" +#include "test/lib/test_utils.hh" #include "serializer_impl.hh" -#define BOOST_TEST_MODULE test-serialization -#include - void show(std::stringstream &ss) { char c; while (ss.get(c)) {