Skip to content

Commit 3b5e289

Browse files
committed
de-dup
1 parent f3bb151 commit 3b5e289

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/mpf.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,7 @@ impl fmt::Display for Mpf {
221221
/// radix point to the left of the first digit. `3.14`, for instance, will
222222
/// print as `314e1` which means `0.314e1`.
223223
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
224-
let mut exp: c_long = 0;
225-
match self.get_str(0, 10, &mut exp) {
226-
ref n if n.len() == 0 => write!(f, "0"),
227-
n => write!(f, "{}e{}", n, exp)
228-
}
224+
<Self as fmt::Debug>::fmt(self, f)
229225
}
230226
}
231227

0 commit comments

Comments
 (0)