From 7d4dd477a263e6693aebc1d2572f17c255e6bb0e Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sat, 19 Jun 2021 21:25:36 +0100 Subject: [PATCH] deprecate on scope and resource too --- src/resource.rs | 1 + src/scope.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/resource.rs b/src/resource.rs index 8c2b83b60..65e283157 100644 --- a/src/resource.rs +++ b/src/resource.rs @@ -196,6 +196,7 @@ where /// )); /// } /// ``` + #[deprecated(since = "4.0.0", note = "Use `.app_data(Data::new(val))` instead.")] pub fn data(self, data: U) -> Self { self.app_data(Data::new(data)) } diff --git a/src/scope.rs b/src/scope.rs index 412c01d95..58f7d75a9 100644 --- a/src/scope.rs +++ b/src/scope.rs @@ -146,6 +146,7 @@ where /// ); /// } /// ``` + #[deprecated(since = "4.0.0", note = "Use `.app_data(Data::new(val))` instead.")] pub fn data(self, data: U) -> Self { self.app_data(Data::new(data)) }