From d0b38c40daeb061ac62a86897a3907dca0804935 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Mon, 17 Jun 2024 15:46:44 +0200 Subject: [PATCH] Match the output of lspci in the PciAddress Display impl --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index bc88e9c..9ec4199 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -52,7 +52,7 @@ impl PciAddress { impl fmt::Display for PciAddress { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{:02x}-{:02x}:{:02x}.{}", self.segment(), self.bus(), self.device(), self.function()) + write!(f, "{:04x}:{:02x}:{:02x}.{}", self.segment(), self.bus(), self.device(), self.function()) } }