mirror of https://github.com/fafhrd91/actix-web
update changelog
This commit is contained in:
parent
e3c127f2fe
commit
782e6ed734
|
@ -7,6 +7,9 @@
|
|||
* `ResponseBuilder::append_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]
|
||||
* `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
|
||||
* `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::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]
|
||||
* `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
|
||||
* `ResponseBuilder::set`; use `ResponseBuilder::insert_header`. [#1869]
|
||||
|
@ -27,6 +33,9 @@
|
|||
* `TestRequest::with_hdr`; 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
|
||||
[#1894]: https://github.com/actix/actix-web/pull/1894
|
||||
[#1903]: https://github.com/actix/actix-web/pull/1903
|
||||
|
@ -34,6 +43,7 @@
|
|||
[#1905]: https://github.com/actix/actix-web/pull/1905
|
||||
[#1912]: https://github.com/actix/actix-web/pull/1912
|
||||
[#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
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
//! Helper trait for types that can be effectively borrowed as a [HeaderValue].
|
||||
|
||||
use std::{borrow::Cow, str::FromStr};
|
||||
|
||||
use http::header::{HeaderName, InvalidHeaderName};
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
//! A multi-value [`HeaderMap`], its iterators, and a helper trait for types that can be effectively
|
||||
//! borrowed as, or converted to, a [HeaderValue].
|
||||
//! A multi-value [`HeaderMap`] and its iterators.
|
||||
|
||||
use std::{borrow::Cow, collections::hash_map, ops};
|
||||
|
||||
|
@ -312,6 +311,8 @@ impl HeaderMap {
|
|||
GetAll::new(self.get_value(key))
|
||||
}
|
||||
|
||||
// TODO: get_all_mut ?
|
||||
|
||||
/// Returns `true` if the map contains a value for the specified key.
|
||||
///
|
||||
/// Invalid header names will simply return false.
|
||||
|
|
Loading…
Reference in New Issue