Skip to content

Commit 41cb828

Browse files
author
ChallengeDev210
committed
Merge rust-bitcoin/rust-bitcoin#716: Add amount::Display - make formatting configurable
4f1200d Added `amount::Display` - configurable formatting (Martin Habovstiak) Pull request description: This significatnly refactors the formatting code to make formatting more configurable. The main addition is the `Display` type which is a builder that can configure denomination or other things (possibly more in the future). Further, this makes all representations of numbers minimal by default, so should be documented as a possibly-breaking change. Because of the effort to support all other `fmt::Formatter` options this required practically complete rewrite of `fmt_satoshi_in`. As a byproduct I took the opportunity of removing one allocation from there. Closes #709 ACKs for top commit: tcharding: ACK 4f1200d dr-orlovsky: ACK 4f1200d sanket1729: ACK 4f1200d Tree-SHA512: 3fafdf63fd720fd4514e026e9d323ac45dfcd3d3a53a4943178b1e84e4cf7603cb6235ecd3989d46c4ae29453c4b0bb2f2a5996fbddf341cd3f68dc286062144
2 parents 40172cc + d7e28fa commit 41cb828

File tree

1 file changed

+464
-42
lines changed

1 file changed

+464
-42
lines changed

0 commit comments

Comments
 (0)