Skip to content

fix for issue #60 - #95

Closed
tanujitghosh wants to merge 1 commit into
rust-cli:masterfrom
tanujitghosh:master
Closed

tanujitghosh wants to merge 1 commit into
rust-cli:masterfrom
tanujitghosh:master

Conversation

@tanujitghosh

Copy link
Copy Markdown

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
Copy Markdown

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

mehcode commented May 9, 2019

Copy link
Copy Markdown
Collaborator

🙇‍♂️ 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
epage added a commit that referenced this pull request Sep 8, 2026
This causes enough issues with zizmor
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