Use a C++17 feature in QUICHE.
All of our downstream users should support C++17 by now. If they do, this will work everywhere, and we convert the rest of the codebase to C++17. If they don't, this will break and the rollback will be limited to this CL.
PiperOrigin-RevId: 421072835
diff --git a/quic/core/http/quic_spdy_stream.cc b/quic/core/http/quic_spdy_stream.cc
index 8147ce0..afeeef0 100644
--- a/quic/core/http/quic_spdy_stream.cc
+++ b/quic/core/http/quic_spdy_stream.cc
@@ -1244,9 +1244,7 @@
std::string protocol;
absl::optional<QuicDatagramStreamId> flow_id;
bool version_indicated = false;
- for (const auto& header : header_list_) {
- const std::string& header_name = header.first;
- const std::string& header_value = header.second;
+ for (const auto& [header_name, header_value] : header_list_) {
if (header_name == ":method") {
if (!method.empty() || header_value.empty()) {
return;