diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc b/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc index fc4f261afb0175..2c74babc05ee43 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc @@ -58,7 +58,7 @@ auto MementoRingBuffer::PopOne() -> Memento { return std::move(entries_[index]); } -auto MementoRingBuffer::Lookup(uint32_t index) const -> const Memento* { +const Memento* MementoRingBuffer::Lookup(uint32_t index) const { if (index >= num_entries_) return nullptr; uint32_t offset = (num_entries_ - 1u - index + first_entry_) % max_entries_; return &entries_[offset]; @@ -87,16 +87,6 @@ void HPackTable::EvictOne() { mem_used_ -= first_entry.transport_size(); } -void HPackTable::Rebuild(uint32_t new_cap) { - EntriesVec entries; - entries.resize(new_cap); - for (size_t i = 0; i < num_entries_; i++) { - entries[i] = std::move(entries_[(first_entry_ + i) % entries_.size()]); - } - first_entry_ = 0; - entries_.swap(entries); -} - void HPackTable::SetMaxBytes(uint32_t max_bytes) { if (max_bytes_ == max_bytes) { return;