added custom Debug implementation for ClientWithMiddleware, skipping middleware_stack field (#22)
parent
525f62039f
commit
6cbea8d7e6
|
@ -3,7 +3,7 @@ use reqwest::multipart::Form;
|
|||
use reqwest::{Body, Client, IntoUrl, Method, Request, Response};
|
||||
use serde::Serialize;
|
||||
use std::convert::TryFrom;
|
||||
use std::fmt::Display;
|
||||
use std::fmt::{self, Display};
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
use task_local_extensions::Extensions;
|
||||
|
@ -138,6 +138,15 @@ impl From<Client> for ClientWithMiddleware {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for ClientWithMiddleware {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
// skipping middleware_stack field for now
|
||||
f.debug_struct("ClientWithMiddleware")
|
||||
.field("inner", &self.inner)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
/// This is a wrapper around [`reqwest::RequestBuilder`] exposing the same API.
|
||||
#[must_use = "RequestBuilder does nothing until you 'send' it"]
|
||||
pub struct RequestBuilder {
|
||||
|
|
Loading…
Reference in New Issue