From 38b7654d300a8e28b70b02d3abfec99e3f67e9b4 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sat, 4 Dec 2021 04:41:20 +0000 Subject: [PATCH] undeprecate `App::data_factory` --- CHANGES.md | 1 + src/app.rs | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c754d4dd6..973b8b60a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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] diff --git a/src/app.rs b/src/app.rs index a291a959e..d03993139 100644 --- a/src/app.rs +++ b/src/app.rs @@ -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(mut self, data: F) -> Self where F: Fn() -> Out + 'static,