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

fix for issue #60 #95

Closed
wants to merge 1 commit into from
Closed

fix for issue #60 #95

wants to merge 1 commit into from

Conversation

tanujitghosh
Copy link

Hi,

I'm new to rust programming and learning it during my free time, wanted to contribute and learn at the same time.

I liked your library and wanted to help out
Worked on this issue #60 below.
Please review and provide your feedback

@richard-uk1
Copy link

Good work! You're a natural at rust.

One thing I would say is that hard-coding the workaround into the source is both inefficient (probably doesn't matter in this case as config parsing isn't performance sensitive), and makes the code more difficult to read. It's better if we can restructure the code so that the logic is correct. If we keep adding work-arounds into the source code we end up with code nobody can understand.

@mehcode
Copy link
Collaborator

mehcode commented May 9, 2019

🙇‍♂️ Thank you for your contribution. I apologize for the late response. Moving forward I want to re-think the design of config as a whole. See #111 for more details.


I think ideally we want to have defaults be expressed as either:

  • An earlier layer in the configuration stack
  • Serde #[serde(default)] on the container level (which would delegate to the Default impl for the container)

The latter would work here if not for some strangeness with how the deserializer interacts with serde.

@mehcode mehcode closed this May 9, 2019
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.

3 participants