Take absl::string_view by value instead of const-ref in ParseDictionary As all the other parsing functions do. PiperOrigin-RevId: 484576083
diff --git a/quiche/common/structured_headers.cc b/quiche/common/structured_headers.cc index 958f627..1f8a12f 100644 --- a/quiche/common/structured_headers.cc +++ b/quiche/common/structured_headers.cc
@@ -875,7 +875,7 @@ return absl::nullopt; } -absl::optional<Dictionary> ParseDictionary(const absl::string_view& str) { +absl::optional<Dictionary> ParseDictionary(absl::string_view str) { StructuredHeaderParser parser(str, StructuredHeaderParser::kFinal); absl::optional<Dictionary> dictionary = parser.ReadDictionary(); if (dictionary && parser.FinishParsing()) return dictionary;
diff --git a/quiche/common/structured_headers.h b/quiche/common/structured_headers.h index c9f2795..00bf795 100644 --- a/quiche/common/structured_headers.h +++ b/quiche/common/structured_headers.h
@@ -309,8 +309,7 @@ // Returns the result of parsing the header value as a general Dictionary, if it // can be parsed as one, or nullopt if it cannot. Structured-Headers Draft 15 // only. -QUICHE_EXPORT absl::optional<Dictionary> ParseDictionary( - const absl::string_view& str); +QUICHE_EXPORT absl::optional<Dictionary> ParseDictionary(absl::string_view str); // Serialization is implemented for Structured-Headers Draft 15 only. QUICHE_EXPORT absl::optional<std::string> SerializeItem(const Item& value);