1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-27 17:22:57 +01:00

Data::into_inner

This commit is contained in:
Erlend Langseth 2019-08-23 17:02:03 +02:00 committed by jesskfullwood
parent 61e492e7e3
commit a07cdd6533
2 changed files with 7 additions and 0 deletions

View File

@ -8,6 +8,8 @@
* Form immplements Responder, returning a `application/x-www-form-urlencoded` response
* Add `into_inner` to `Data`
### Changed
* `Query` payload made `pub`. Allows user to pattern-match the payload.

View File

@ -77,6 +77,11 @@ impl<T> Data<T> {
pub fn get_ref(&self) -> &T {
self.0.as_ref()
}
/// Convert to the internal Arc<T>
pub fn into_inner(self) -> Arc<T> {
self.0
}
}
impl<T> Deref for Data<T> {