Skip to content

Commit 06878d2

Browse files
committed
fixup Debug implemetation
1 parent 335b352 commit 06878d2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,10 @@ impl OrderlyAllocator {
292292

293293
impl fmt::Debug for OrderlyAllocator {
294294
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
295-
f.write_str("OrderlyAllocator")?;
296-
f.debug_map()
297-
.entry(&"capacity", &self.capacity)
298-
.entry(&"total_available", &self.available)
299-
.entry(&"largest_available", &self.largest_available())
295+
f.debug_struct("OrderlyAllocator")
296+
.field(&"capacity", &self.capacity)
297+
.field(&"total_available", &self.available)
298+
.field(&"largest_available", &self.largest_available())
300299
.finish()
301300
}
302301
}

0 commit comments

Comments
 (0)