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

Reduce code duplication #27

Merged
merged 1 commit into from Dec 18, 2019
Merged

Reduce code duplication #27

merged 1 commit into from Dec 18, 2019

Conversation

giordano
Copy link
Member

Following up #24, I've changed the signature of

Z(c::AbstractCosmology, z::Real; kws...)

to

Z(c::AbstractCosmology, z::Real, ::Nothing; kws...)

then removed methods with a single redshift and added nothing as default value of the second redshift for the methods with two redshifts.

This is an implementation detail that shouldn't matter for the users, the API is identical, but allows us to remove almost identical methods.

CC: @astrozot.

@astrozot
Copy link
Contributor

Sounds good!

@giordano giordano merged commit 9e31ad5 into JuliaAstro:master Dec 18, 2019
@giordano giordano deleted the simplify branch December 18, 2019 23:01
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