Commit graph

8 commits

Author SHA1 Message Date
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