udp: improve WorkerType Display implementation

This commit is contained in:
Joakim Frostegård 2024-01-29 22:27:03 +01:00
parent 9d8aca8f86
commit 216bb93088

View file

@ -281,8 +281,8 @@ enum WorkerType {
impl Display for WorkerType { impl Display for WorkerType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self { match self {
Self::Swarm(index) => f.write_fmt(format_args!("Swarm worker {}", index)), Self::Swarm(index) => f.write_fmt(format_args!("Swarm worker {}", index + 1)),
Self::Socket(index) => f.write_fmt(format_args!("Socket worker {}", index)), Self::Socket(index) => f.write_fmt(format_args!("Socket worker {}", index + 1)),
Self::Statistics => f.write_str("Statistics worker"), Self::Statistics => f.write_str("Statistics worker"),
Self::Signals => f.write_str("Signals worker"), Self::Signals => f.write_str("Signals worker"),
#[cfg(feature = "prometheus")] #[cfg(feature = "prometheus")]