structopt-toml icon indicating copy to clipboard operation
structopt-toml copied to clipboard

Derived `Default` implementation incorrect?

Open smoelius opened this issue 4 years ago • 0 comments

https://github.com/dalance/structopt-toml/blob/2cb3d47eabd1d0c182218e7a8646d2e82ed75422/structopt-toml-derive/src/lib.rs#L54-L58

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.

smoelius avatar Aug 29 '21 13:08 smoelius