Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why Currency as ref? #93

Open
DavyJo opened this issue Jul 12, 2023 · 1 comment
Open

Why Currency as ref? #93

DavyJo opened this issue Jul 12, 2023 · 1 comment

Comments

@DavyJo
Copy link

DavyJo commented Jul 12, 2023

Hi, just wondering why the Currency is passed as a ref and not as owned? It makes getting started in fast manner pretty hard as pollution with lifetimes is hugely annoying in nested and complex data structures.

@alopatindev
Copy link

alopatindev commented Aug 19, 2023

Taking into account that Currency and Money are currently Copy it seems there's no reason why they are still references.

Also Decimal is Copy but Money::amount returns reference too.

What's the reason for having so many references? Thanks.

alopatindev added a commit to alopatindev/rusty_money that referenced this issue Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants