chore: remove unnecessary Debug implmentation (#8001)

This commit is contained in:
Abner Zheng
2024-05-01 00:14:25 +08:00
committed by GitHub
parent e158542d31
commit 9153d8848f
2 changed files with 3 additions and 25 deletions

View File

@ -34,7 +34,6 @@ use reth_rpc_api::servers::*;
use reth_tasks::{pool::BlockingTaskPool, TaskSpawner};
use reth_transaction_pool::TransactionPool;
use std::{
fmt,
net::{IpAddr, Ipv4Addr, SocketAddr},
time::{Duration, SystemTime, UNIX_EPOCH},
};
@ -218,6 +217,7 @@ impl AuthServerConfig {
}
/// Builder type for configuring an `AuthServerConfig`.
#[derive(Debug)]
pub struct AuthServerConfigBuilder {
socket_addr: Option<SocketAddr>,
secret: JwtSecret,
@ -226,18 +226,6 @@ pub struct AuthServerConfigBuilder {
ipc_endpoint: Option<String>,
}
impl fmt::Debug for AuthServerConfigBuilder {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("AuthServerConfig")
.field("socket_addr", &self.socket_addr)
.field("secret", &self.secret)
.field("server_config", &self.server_config)
.field("ipc_server_config", &self.ipc_server_config)
.field("ipc_endpoint", &self.ipc_endpoint)
.finish()
}
}
// === impl AuthServerConfigBuilder ===
impl AuthServerConfigBuilder {

View File

@ -2113,7 +2113,7 @@ impl fmt::Debug for RpcServer {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("RpcServer")
.field("http", &self.ws_http.http_local_addr.is_some())
.field("ws", &self.ws_http.http_local_addr.is_some())
.field("ws", &self.ws_http.ws_local_addr.is_some())
.field("ipc", &self.ipc.is_some())
.finish()
}
@ -2122,7 +2122,7 @@ impl fmt::Debug for RpcServer {
/// A handle to the spawned servers.
///
/// When this type is dropped or [RpcServerHandle::stop] has been called the server will be stopped.
#[derive(Clone)]
#[derive(Clone, Debug)]
#[must_use = "Server stops if dropped"]
pub struct RpcServerHandle {
/// The address of the http/ws server
@ -2225,16 +2225,6 @@ impl RpcServerHandle {
}
}
impl fmt::Debug for RpcServerHandle {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("RpcServerHandle")
.field("http", &self.http.is_some())
.field("ws", &self.ws.is_some())
.field("ipc", &self.ipc.is_some())
.finish()
}
}
#[cfg(test)]
mod tests {
use super::*;