undeprecate `App::data_factory`

This commit is contained in:
Rob Ede 2021-12-04 04:41:20 +00:00
parent a2d5c5a058
commit 38b7654d30
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
2 changed files with 1 additions and 4 deletions

View File

@ -8,6 +8,7 @@
### Changed
* Rename `Accept::{mime_precedence => ranked}`. [#2480]
* Rename `Accept::{mime_preference => preference}`. [#2480]
* Un-deprecate `App::data_factory`. [#????]
### Fixed
* Accept wildcard `*` items in `AcceptLanguage`. [#2480]

View File

@ -142,10 +142,6 @@ where
/// Add application data factory. This function is similar to `.data()` but it accepts a
/// "data factory". Data values are constructed asynchronously during application
/// 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
where
F: Fn() -> Out + 'static,