Skip to content

Commit eb383c0

Browse files
committed
Update arbitrary_precision Debug impl of Number to match normal one
This way both print indentation when formatting with {:#?}.
1 parent 351d847 commit eb383c0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/number.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,10 @@ impl Debug for Number {
290290

291291
#[cfg(feature = "arbitrary_precision")]
292292
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
293-
write!(formatter, "Number({})", &self.n)
293+
formatter
294+
.debug_tuple("Number")
295+
.field(&format_args!("{}", self.n))
296+
.finish()
294297
}
295298
}
296299

0 commit comments

Comments
 (0)