From 427fc41b317cbee46dc93512e24ac2fb8357415f Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sun, 1 Jan 2023 20:31:41 +0000 Subject: [PATCH] update changelog and docs --- actix-http/CHANGES.md | 4 ++-- actix-http/src/header/map.rs | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md index b4b5c8c12..e99c36f78 100644 --- a/actix-http/CHANGES.md +++ b/actix-http/CHANGES.md @@ -4,14 +4,14 @@ ### Added - Implement `MessageBody` for `&mut B` where `B: MessageBody + Unpin`. [#2868] - Implement `MessageBody` for `Pin` where `B::Target: MessageBody`. [#2868] -- `HeaderMap::retain()` [#????]. +- `HeaderMap::retain()` [#2955]. ### Performance - Improve overall performance of operations on `Extensions`. [#2890] [#2868]: https://github.com/actix/actix-web/pull/2868 [#2890]: https://github.com/actix/actix-web/pull/2890 -[#????]: https://github.com/actix/actix-web/pull/???? +[#2955]: https://github.com/actix/actix-web/pull/2955 ## 3.2.2 - 2022-09-11 diff --git a/actix-http/src/header/map.rs b/actix-http/src/header/map.rs index 78289ec2f..5f833d149 100644 --- a/actix-http/src/header/map.rs +++ b/actix-http/src/header/map.rs @@ -550,6 +550,13 @@ impl HeaderMap { Keys(self.inner.keys()) } + /// Retains only the headers specified by the predicate. + /// + /// In other words, removes all headers `(name, val)` for which `retain_fn(&name, &mut val)` + /// returns false. + /// + /// The order in which headers are visited should be considered arbitrary. + /// /// # Examples /// ``` /// # use actix_http::header::{self, HeaderMap, HeaderValue};