1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-06-11 09:49:29 +00: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> {