diff --git a/src/tests/util/response.rs b/src/tests/util/response.rs index 8fb01bdcad..42525d5da1 100644 --- a/src/tests/util/response.rs +++ b/src/tests/util/response.rs @@ -3,27 +3,21 @@ use bytes::Bytes; use googletest::prelude::*; use serde_json::Value; use std::marker::PhantomData; -use std::ops::Deref; use std::str::from_utf8; use crate::rate_limiter::LimitedAction; +use derive_more::Deref; use http::{header, StatusCode}; /// A type providing helper methods for working with responses +#[derive(Deref)] #[must_use] pub struct Response { + #[deref] response: hyper::Response, return_type: PhantomData, } -impl Deref for Response<()> { - type Target = hyper::Response; - - fn deref(&self) -> &Self::Target { - &self.response - } -} - impl Response where for<'de> T: serde::Deserialize<'de>,