lib.rs holds four unrelated types in over two thousand lines #31
Labels
No labels
kind
bug
kind
enhancement
kind
refactor
workflow
needs-info
workflow
needs-triage
workflow
ready-for-agent
workflow
ready-for-human
workflow
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rosa/lucre#31
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
lib.rscarriesMoneyand its arithmetic,Currency, both ISO code types,RoundingMode, five error enums, and the generated ISO catalog — a little overtwo thousand lines. Every other concept in the crate already has a module of its
own. Give these the same treatment.
Split into
money.rs, holdingMoney,MoneyError, and every arithmetic andoperator impl; and
currency.rs, holdingCurrency,IsoAlphabeticCode,IsoNumericCode, the generated catalog, and the four errors those types return.lib.rskeeps the crate documentation, the module declarations, and there-exports.
RoundingModestays at the root.Tests move with the code they cover. Nothing about the public API changes: every
path a caller writes today still resolves.
Acceptance criteria
Moneyand its operator impls live inmoney.rsCurrency, both code types, and the generated catalog live incurrency.rslib.rsholds only crate documentation, module declarations, and re-exportsmise run cipassesBlocked by
None — can start immediately.