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

Check validity in constructors #113

Merged
merged 3 commits into from
Jun 26, 2020
Merged

Check validity in constructors #113

merged 3 commits into from
Jun 26, 2020

Conversation

EricForgy
Copy link
Member

No description provided.

deps/currency-data.jl Outdated Show resolved Hide resolved
src/Currencies.jl Outdated Show resolved Hide resolved
src/Currencies.jl Outdated Show resolved Hide resolved
src/Currencies.jl Outdated Show resolved Hide resolved

Currency(symbol::Symbol, unit::Integer, code::Integer, name::AbstractString) =
(get!(_currency_data, symbol) do ; (Currency{symbol}(), unit, code, name) ; end)[1]
struct Currency{S}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't utilize the cache in _currency_data, but I'll fix that up later.

@ScottPJones ScottPJones merged commit 4599067 into master Jun 26, 2020
@ScottPJones ScottPJones deleted the ef branch June 26, 2020 02:00
@EricForgy EricForgy changed the title Check validity in constructors [DO NOT MERGE] Check validity in constructors Jun 26, 2020
@EricForgy EricForgy changed the title [DO NOT MERGE] Check validity in constructors Check validity in constructors Jun 26, 2020
@EricForgy EricForgy restored the ef branch June 26, 2020 12:22
@EricForgy EricForgy deleted the ef branch June 28, 2020 03:10
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

Successfully merging this pull request may close these issues.

None yet

2 participants