Skip to content

Commit

Permalink
feat: update fmt::Debug impl to be same as others
Browse files Browse the repository at this point in the history
Namely
- impl fmt::Debug for ClientBuilder
- impl fmt::Debug for Client
  • Loading branch information
c-git committed Aug 20, 2024
1 parent 3c71ba2 commit 56484a4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/wasm/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,14 +366,22 @@ impl Default for ClientBuilder {
}
}

#[derive(Debug)]
struct Config {
// NOTE: When adding a new field, update `fmt_fields` in impl Config
headers: HeaderMap,
#[cfg(feature = "cookies")]
cookie_store: Option<Arc<dyn cookie::CookieStore>>,
error: Option<crate::Error>,
}

impl fmt::Debug for Config {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let mut builder = f.debug_struct("Config");
self.fmt_fields(&mut builder);
builder.finish()
}
}

impl Default for Config {
fn default() -> Config {
Config {
Expand Down

0 comments on commit 56484a4

Please sign in to comment.