diff --git a/CHANGES.md b/CHANGES.md index 3aadc8f1e..192323460 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 3461d24f3..14e293bc2 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 {