Improve documentation for clap::Args::augment_args and clap::Args::augment_args_for_update #5682
Open
2 tasks done
Labels
C-bug
Category: Updating dependencies
Please complete the following tasks
Rust Version
rustc 1.75.0 (82e1608df 2023-12-21)
Clap Version
4.4.18
Minimal reproducible code
Read the documentation for
clap::Args
:The documentation does not describe how to implement
Args::augment_args
orArgs::augment_args_for_update
, and it only hints at the difference between them. The documentation links toCommandFactory
, but that doesn't really help either. Theflatten_hand_args.rs
example provides a basic idea, but I still have to guess at the semantics. Further, the example's implementation ofaugment_args
andaugment_args_for_update
are identical, which is baffling. I tried reading the source code, but still couldn't figure out the difference between the two.Steps to reproduce the bug with the above code
Read the above documentation.
Actual Behaviour
The current documentation is missing details. The example is good, but incomplete.
Expected Behaviour
The documentation should describe the semantics of the two methods. It should also make clearer what the difference between the two is (what does so it can instantiate Self vs so it can update Self mean).
Additional Context
This seemed like the most appropriate template for this documentation issue. I apologize if I should have chosen a different template.
Debug Output
No response
The text was updated successfully, but these errors were encountered: