Skip to content

Commit 56dc7f9

Browse files
committed
shorten Debug output
1 parent c70044c commit 56dc7f9

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/volatile_ptr/mod.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ where
5050
T: ?Sized,
5151
{
5252
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
53-
f.debug_struct("VolatilePtr")
54-
.field("pointer", &self.pointer)
55-
.field("access", &self.access)
56-
.finish()
53+
fmt::Pointer::fmt(&self.pointer.as_ptr(), f)
5754
}
5855
}
5956

src/volatile_ref.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,7 @@ where
245245
T: ?Sized,
246246
{
247247
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
248-
f.debug_struct("VolatileRef")
249-
.field("pointer", &self.pointer)
250-
.field("access", &self.access)
251-
.finish()
248+
fmt::Pointer::fmt(&self.pointer.as_ptr(), f)
252249
}
253250
}
254251

0 commit comments

Comments
 (0)