Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
ctiller committed Dec 11, 2024
1 parent 5b3709b commit 63258dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
3 changes: 2 additions & 1 deletion src/core/ext/transport/chaotic_good/chaotic_good_transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ class ChaoticGoodTransport : public RefCounted<ChaoticGoodTransport> {
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<FrameInterface&>(client_frame));
},
[]() -> LoopCtl<absl::Status> {
// The write failures will be caught in TrySeq and exit loop.
Expand Down
27 changes: 0 additions & 27 deletions src/core/ext/transport/chaotic_good/frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,33 +186,6 @@ using ServerFrame =
absl::variant<ServerInitialMetadataFrame, MessageFrame, BeginMessageFrame,
MessageChunkFrame, ServerTrailingMetadataFrame>;

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

Expand Down

0 comments on commit 63258dc

Please sign in to comment.