Skip to content

Commit

Permalink
feat: impl debug for client (#101)
Browse files Browse the repository at this point in the history
Fix #99

---------

Co-authored-by: Graeme Coupar <[email protected]>
  • Loading branch information
carlocorradini and obmarg authored Jun 7, 2024
1 parent 14b487a commit 16cb857
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/next/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use std::sync::{
atomic::{AtomicUsize, Ordering},
Arc,
use std::{
fmt,
sync::{
atomic::{AtomicUsize, Ordering},
Arc,
},
};

use futures::{channel::mpsc, SinkExt, StreamExt};
Expand Down Expand Up @@ -130,3 +133,11 @@ pub(super) enum ConnectionCommand {
Cancel(usize),
Close(u16, String),
}

impl fmt::Debug for Client {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Client")
.field("subscription_buffer_size", &self.subscription_buffer_size)
.finish_non_exhaustive()
}
}

0 comments on commit 16cb857

Please sign in to comment.