From a07cdd6533cb1e29c730da5811ba6d9928e3bbc9 Mon Sep 17 00:00:00 2001 From: Erlend Langseth Date: Fri, 23 Aug 2019 17:02:03 +0200 Subject: [PATCH] Data::into_inner --- CHANGES.md | 2 ++ src/data.rs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 3aadc8f1..19232346 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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. diff --git a/src/data.rs b/src/data.rs index 3461d24f..14e293bc 100644 --- a/src/data.rs +++ b/src/data.rs @@ -77,6 +77,11 @@ impl Data { pub fn get_ref(&self) -> &T { self.0.as_ref() } + + /// Convert to the internal Arc + pub fn into_inner(self) -> Arc { + self.0 + } } impl Deref for Data {