mirror of https://github.com/fafhrd91/actix-web
deprecate on scope and resource too
This commit is contained in:
parent
43c193ca18
commit
7d4dd477a2
|
@ -196,6 +196,7 @@ where
|
||||||
/// ));
|
/// ));
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
#[deprecated(since = "4.0.0", note = "Use `.app_data(Data::new(val))` instead.")]
|
||||||
pub fn data<U: 'static>(self, data: U) -> Self {
|
pub fn data<U: 'static>(self, data: U) -> Self {
|
||||||
self.app_data(Data::new(data))
|
self.app_data(Data::new(data))
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,6 +146,7 @@ where
|
||||||
/// );
|
/// );
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
#[deprecated(since = "4.0.0", note = "Use `.app_data(Data::new(val))` instead.")]
|
||||||
pub fn data<U: 'static>(self, data: U) -> Self {
|
pub fn data<U: 'static>(self, data: U) -> Self {
|
||||||
self.app_data(Data::new(data))
|
self.app_data(Data::new(data))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue