From 63258dc8fbd69b8ee43ce098c8c8802333658902 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 11 Dec 2024 14:44:20 -0800 Subject: [PATCH] x --- .../chaotic_good/chaotic_good_transport.h | 3 ++- src/core/ext/transport/chaotic_good/frame.h | 27 ------------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/src/core/ext/transport/chaotic_good/chaotic_good_transport.h b/src/core/ext/transport/chaotic_good/chaotic_good_transport.h index 4136d9752ae20..4c83a57bd1867 100644 --- a/src/core/ext/transport/chaotic_good/chaotic_good_transport.h +++ b/src/core/ext/transport/chaotic_good/chaotic_good_transport.h @@ -160,7 +160,8 @@ class ChaoticGoodTransport : public RefCounted { outgoing_frames.Next(), // Serialize and write it out. [self = self.get()](Frame client_frame) { - return self->WriteFrame(GetFrameInterface(client_frame)); + return self->WriteFrame( + absl::ConvertVariantTo(client_frame)); }, []() -> LoopCtl { // The write failures will be caught in TrySeq and exit loop. diff --git a/src/core/ext/transport/chaotic_good/frame.h b/src/core/ext/transport/chaotic_good/frame.h index 5cdc0961e2f6c..3e4eaed36ff03 100644 --- a/src/core/ext/transport/chaotic_good/frame.h +++ b/src/core/ext/transport/chaotic_good/frame.h @@ -186,33 +186,6 @@ using ServerFrame = absl::variant; -inline FrameInterface& GetFrameInterface(ClientFrame& frame) { - return MatchMutable( - &frame, - [](ClientInitialMetadataFrame* frame) -> FrameInterface& { - return *frame; - }, - [](MessageFrame* frame) -> FrameInterface& { return *frame; }, - [](BeginMessageFrame* frame) -> FrameInterface& { return *frame; }, - [](MessageChunkFrame* frame) -> FrameInterface& { return *frame; }, - [](ClientEndOfStream* frame) -> FrameInterface& { return *frame; }, - [](CancelFrame* frame) -> FrameInterface& { return *frame; }); -} - -inline FrameInterface& GetFrameInterface(ServerFrame& frame) { - return MatchMutable( - &frame, - [](ServerInitialMetadataFrame* frame) -> FrameInterface& { - return *frame; - }, - [](MessageFrame* frame) -> FrameInterface& { return *frame; }, - [](BeginMessageFrame* frame) -> FrameInterface& { return *frame; }, - [](MessageChunkFrame* frame) -> FrameInterface& { return *frame; }, - [](ServerTrailingMetadataFrame* frame) -> FrameInterface& { - return *frame; - }); -} - } // namespace chaotic_good } // namespace grpc_core