mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-01 00:44:26 +02:00
undeprecate App::data_factory
(#2484)
This commit is contained in:
@ -140,10 +140,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,
|
||||
|
Reference in New Issue
Block a user