Commit graph

16 commits

Author SHA1 Message Date
Pavan Kumar Sunkara
0cbec63489 Make sure that ArgMatches methods panic on unknown arg, not return false 2021-10-27 02:42:30 +01:00
Pavan Kumar Sunkara
3f94d17c71 Removed Arg::multiple 2021-06-16 07:17:11 +01:00
Felipe Sere
03d4989ef9 Replicate the derive test for from_global 2021-05-18 22:21:18 +01:00
ldm0
886b873709 Demangle interlinking flags 2021-03-09 13:45:11 +00:00
Pavan Kumar Sunkara
c9cb22905c Build help and version args at the beginning 2021-02-07 14:46:38 +00:00
Donough Liu
fa9be84b18 Propagate global arg in subcommand to subsubcommand 2020-12-12 22:20:16 +08:00
Pavan Kumar Sunkara
7bc282dd4e Rename with_name to new for Arg & ArgGroup 2020-05-14 22:50:56 +02:00
creativcoder
92d5920748 Updated test and usage of older help APIs with about 2020-04-27 02:42:07 +05:30
Pavan Kumar Sunkara
b7f76d8e8d Put the test helper in tests 2020-02-04 09:51:46 +01:00
Kevin K
4cc85990fd
refactor: removed strings as an internal ID for arguments, groups, and
subcommands

This commit changes the internal ID to a u64 which will allow for
greater optimizations down the road. In addition, it lays the ground
work for allowing users to use things like enum variants as argument
keys instead of strings.

The only downside is each key needs to be hashed (the implementation
used is an FNV hasher for performance). However, the performance gains
in faster iteration, comparison, etc. should easily outweigh the single
hash of each argument.

Another benefit of if this commit is the removal of several lifetime
parameters, as it stands Arg and App now only have a single lifetime
parameter, and ArgMatches and ArgGroup have no lifetime parameter.
2019-04-05 20:21:22 -04:00
Kevin K
20c72525d2 style: cargo fmt run 2018-11-14 12:05:06 -05:00
Kevin K
03333800fe refactor: remove code going to other crates and deprecations 2018-10-19 23:31:06 -04:00
Kevin K
1fa4afa45d
tests: continues to update tests to take advantage of new internals 2018-01-25 22:54:05 -05:00
Kevin K
1ab10275e4
style: rustfmt run 2018-01-25 12:21:17 -05:00
Kevin K
7ac5a5af9f tests: cleans up certain test cases litle by little 2018-01-09 10:53:20 -05:00
Kevin K
2c3f7f6054
tests: adds tests to protect against panics when using globals and calling App::get_matches_from_safe_borrow multiple times 2017-10-24 10:46:00 -04:00