mirror of
https://github.com/actix/actix-web.git
synced 2024-11-26 03:21:08 +00:00
undeprecate App::data_factory
(#2484)
This commit is contained in:
parent
c7c02ef99d
commit
fa7f3e6908
2 changed files with 2 additions and 4 deletions
|
@ -10,6 +10,7 @@
|
||||||
### Changed
|
### Changed
|
||||||
* Rename `Accept::{mime_precedence => ranked}`. [#2480]
|
* Rename `Accept::{mime_precedence => ranked}`. [#2480]
|
||||||
* Rename `Accept::{mime_preference => preference}`. [#2480]
|
* Rename `Accept::{mime_preference => preference}`. [#2480]
|
||||||
|
* Un-deprecate `App::data_factory`. [#2484]
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
* Accept wildcard `*` items in `AcceptLanguage`. [#2480]
|
* Accept wildcard `*` items in `AcceptLanguage`. [#2480]
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
[#2468]: https://github.com/actix/actix-web/pull/2468
|
[#2468]: https://github.com/actix/actix-web/pull/2468
|
||||||
[#2480]: https://github.com/actix/actix-web/pull/2480
|
[#2480]: https://github.com/actix/actix-web/pull/2480
|
||||||
[#2482]: https://github.com/actix/actix-web/pull/2482
|
[#2482]: https://github.com/actix/actix-web/pull/2482
|
||||||
|
[#2484]: https://github.com/actix/actix-web/pull/2484
|
||||||
|
|
||||||
|
|
||||||
## 4.0.0-beta.13 - 2021-11-30
|
## 4.0.0-beta.13 - 2021-11-30
|
||||||
|
|
|
@ -140,10 +140,6 @@ where
|
||||||
/// Add application data factory. This function is similar to `.data()` but it accepts a
|
/// Add application data factory. This function is similar to `.data()` but it accepts a
|
||||||
/// "data factory". Data values are constructed asynchronously during application
|
/// "data factory". Data values are constructed asynchronously during application
|
||||||
/// initialization, before the server starts accepting requests.
|
/// initialization, before the server starts accepting requests.
|
||||||
#[deprecated(
|
|
||||||
since = "4.0.0",
|
|
||||||
note = "Construct data value before starting server and use `.app_data(Data::new(val))` instead."
|
|
||||||
)]
|
|
||||||
pub fn data_factory<F, Out, D, E>(mut self, data: F) -> Self
|
pub fn data_factory<F, Out, D, E>(mut self, data: F) -> Self
|
||||||
where
|
where
|
||||||
F: Fn() -> Out + 'static,
|
F: Fn() -> Out + 'static,
|
||||||
|
|
Loading…
Reference in a new issue