diff --git a/reqwest-middleware/src/client.rs b/reqwest-middleware/src/client.rs index fdf091d..61c1774 100644 --- a/reqwest-middleware/src/client.rs +++ b/reqwest-middleware/src/client.rs @@ -247,6 +247,15 @@ impl fmt::Debug for ClientWithMiddleware { } } +// Implementing AsRef for ClientWithMiddleware. +// +// This allows to use ClientWithMiddleware as a reqwest::Client. +impl AsRef for ClientWithMiddleware { + fn as_ref(&self) -> &Client { + &self.inner + } +} + mod service { use std::{ future::Future,