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

Derived Default implementation incorrect? #13

Open
smoelius opened this issue Aug 29, 2021 · 0 comments
Open

Derived Default implementation incorrect? #13

smoelius opened this issue Aug 29, 2021 · 0 comments

Comments

@smoelius
Copy link

impl Default for #name {
fn default() -> Self {
#name::from_args()
}
}

Isn't it incorrect to call from_args when say from_clap_with_toml initiates a merge?

from_args assumes that all of the process arguments are being parsed. But from_clap_with_toml's ArgMatches argument could refer to only some of the process arguments.

I have so far been unsuccessful in figuring out how to fix this. Perhaps the solution will be obvious to you.

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

1 participant