Skip to content

Commit 1138b2e

Browse files
bjorn3IsaacWoods
authored andcommitted
Match the output of lspci in the PciAddress Display impl
1 parent 233c179 commit 1138b2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl PciAddress {
5252

5353
impl fmt::Display for PciAddress {
5454
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
55-
write!(f, "{:02x}-{:02x}:{:02x}.{}", self.segment(), self.bus(), self.device(), self.function())
55+
write!(f, "{:04x}:{:02x}:{:02x}.{}", self.segment(), self.bus(), self.device(), self.function())
5656
}
5757
}
5858

0 commit comments

Comments
 (0)