Skip to content

Commit

Permalink
GH-43238: [C++][FlightRPC] Reduce repetition in flight/types.cc in se…
Browse files Browse the repository at this point in the history
…rde functions (#43237)

### Rationale for this change

Local templates can be used to reduce repetition in serde code.

### What changes are included in this PR?

 - `Deserialize` and `SerializeToString` on the types in `flight/types.cc` are now defined in terms of a few templates
 - Use of `ParseFromArray` to parse `std::string_view` inputs instead of wrapping it in a `google::protobuf::io::ArrayInputStream`

### Are these changes tested?

By existing tests.

* GitHub Issue: #43238

Authored-by: Felipe Oliveira Carvalho <[email protected]>
Signed-off-by: Felipe Oliveira Carvalho <[email protected]>
  • Loading branch information
felipecrv authored Jul 15, 2024
1 parent 3380678 commit 0051257
Showing 1 changed file with 116 additions and 398 deletions.
Loading

0 comments on commit 0051257

Please sign in to comment.