Skip to content

Commit

Permalink
restore print_tcp_listener in printer (#2221)
Browse files Browse the repository at this point in the history
  • Loading branch information
mthom committed Dec 11, 2023
1 parent 1e1426c commit d14cce2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/heap_print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,6 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
}
}

#[allow(dead_code)]
fn print_tcp_listener(&mut self, tcp_listener: &TcpListener, max_depth: usize) {
let (ip, port) = if let Ok(addr) = tcp_listener.local_addr() {
(addr.ip(), addr.port())
Expand Down Expand Up @@ -1727,6 +1726,9 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
(ArenaHeaderTag::Stream, stream) => {
self.print_stream(stream, max_depth);
}
(ArenaHeaderTag::TcpListener, listener) => {
self.print_tcp_listener(&*listener, max_depth);
}
(ArenaHeaderTag::Dropped, _value) => {
self.print_impromptu_atom(atom!("$dropped_value"));
}
Expand Down

0 comments on commit d14cce2

Please sign in to comment.