update changelog

This commit is contained in:
Rob Ede 2021-02-09 06:48:36 +00:00
parent e3c127f2fe
commit 782e6ed734
No known key found for this signature in database
GPG Key ID: C2A3B36E841A91E6
3 changed files with 15 additions and 2 deletions

View File

@ -7,6 +7,9 @@
* `ResponseBuilder::append_header` method which allows using typed headers. [#1869] * `ResponseBuilder::append_header` method which allows using typed headers. [#1869]
* `TestRequest::insert_header` method which allows using typed headers. [#1869] * `TestRequest::insert_header` method which allows using typed headers. [#1869]
* `ContentEncoding` implements all necessary header traits. [#1912] * `ContentEncoding` implements all necessary header traits. [#1912]
* `HeaderMap::len_keys` has the behavior of the old `len` method. [#1964]
* `HeaderMap::drain` as an efficient draining iterator. [#1964]
* Implement `IntoIterator` for owned `HeaderMap`. [#1964]
### Changed ### Changed
* `ResponseBuilder::content_type` now takes an `impl IntoHeaderValue` to support using typed * `ResponseBuilder::content_type` now takes an `impl IntoHeaderValue` to support using typed
@ -19,6 +22,9 @@
* `client::error::ConnectError` Resolver variant contains `Box<dyn std::error::Error>` type [#1905] * `client::error::ConnectError` Resolver variant contains `Box<dyn std::error::Error>` type [#1905]
* `client::ConnectorConfig` default timeout changed to 5 seconds. [#1905] * `client::ConnectorConfig` default timeout changed to 5 seconds. [#1905]
* Simplify `BlockingError` type to a struct. It's only triggered with blocking thread pool is dead. [#1957] * Simplify `BlockingError` type to a struct. It's only triggered with blocking thread pool is dead. [#1957]
* `HeaderMap::len` now returns number of values instead of number of keys. [#1964]
* `HeaderMap::insert` now returns iterator of removed values. [#1964]
* `HeaderMap::remove` now returns iterator of removed values. [#1964]
### Removed ### Removed
* `ResponseBuilder::set`; use `ResponseBuilder::insert_header`. [#1869] * `ResponseBuilder::set`; use `ResponseBuilder::insert_header`. [#1869]
@ -27,6 +33,9 @@
* `TestRequest::with_hdr`; use `TestRequest::default().insert_header()`. [#1869] * `TestRequest::with_hdr`; use `TestRequest::default().insert_header()`. [#1869]
* `TestRequest::with_header`; use `TestRequest::default().insert_header()`. [#1869] * `TestRequest::with_header`; use `TestRequest::default().insert_header()`. [#1869]
### Documentation
* Vastly improve docs and add examples for `HeaderMap`. [#1964]
[#1869]: https://github.com/actix/actix-web/pull/1869 [#1869]: https://github.com/actix/actix-web/pull/1869
[#1894]: https://github.com/actix/actix-web/pull/1894 [#1894]: https://github.com/actix/actix-web/pull/1894
[#1903]: https://github.com/actix/actix-web/pull/1903 [#1903]: https://github.com/actix/actix-web/pull/1903
@ -34,6 +43,7 @@
[#1905]: https://github.com/actix/actix-web/pull/1905 [#1905]: https://github.com/actix/actix-web/pull/1905
[#1912]: https://github.com/actix/actix-web/pull/1912 [#1912]: https://github.com/actix/actix-web/pull/1912
[#1957]: https://github.com/actix/actix-web/pull/1957 [#1957]: https://github.com/actix/actix-web/pull/1957
[#1964]: https://github.com/actix/actix-web/pull/1964
## 3.0.0-beta.1 - 2021-01-07 ## 3.0.0-beta.1 - 2021-01-07

View File

@ -1,3 +1,5 @@
//! Helper trait for types that can be effectively borrowed as a [HeaderValue].
use std::{borrow::Cow, str::FromStr}; use std::{borrow::Cow, str::FromStr};
use http::header::{HeaderName, InvalidHeaderName}; use http::header::{HeaderName, InvalidHeaderName};

View File

@ -1,5 +1,4 @@
//! A multi-value [`HeaderMap`], its iterators, and a helper trait for types that can be effectively //! A multi-value [`HeaderMap`] and its iterators.
//! borrowed as, or converted to, a [HeaderValue].
use std::{borrow::Cow, collections::hash_map, ops}; use std::{borrow::Cow, collections::hash_map, ops};
@ -312,6 +311,8 @@ impl HeaderMap {
GetAll::new(self.get_value(key)) GetAll::new(self.get_value(key))
} }
// TODO: get_all_mut ?
/// Returns `true` if the map contains a value for the specified key. /// Returns `true` if the map contains a value for the specified key.
/// ///
/// Invalid header names will simply return false. /// Invalid header names will simply return false.