This repository has been archived by the owner on Jul 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unboilerplatify code for defining currencies (#142)
* unboilerplatify code for defining currencies. This changes code to use a macro which enables easily adding new variants of currencies over time and excludes the possibility of mismatching variants in impls. Also new macro statically ensures that byte string identifiers ascipted to variants conforms their respective names. * add tests for `CurrencyId` (from #139) * add `TryFrom<&[u8]>` implementation for `CurrencyId` where ownership aren't required Co-authored-by: Anthony Mikhailov <[email protected]> Co-authored-by: Alexander Koz <[email protected]>
- Loading branch information
1 parent
4a1e3c5
commit 7b380fc
Showing
1 changed file
with
124 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters