Commit graph

1831 commits

Author SHA1 Message Date
Homu
7b08a0a583 Auto merge of #879 - kbknapp:perf-imp, r=kbknapp
Perf imp
2017-03-01 01:49:16 +09:00
Kevin K
ceec86d3bd
tests: fixes lifetime issue in a test 2017-02-28 08:46:21 -05:00
Kevin K
5471b67121
chore: updates version to next release num 2017-02-28 08:30:14 -05:00
Kevin K
a822ad8c27
tests: adds a bench for rustups subcommand parsing 2017-02-28 08:30:14 -05:00
Kevin K
8da0303bc0
perf: vastly reduces the amount of cloning when adding non-global args minus when they're added from App::args which is forced to clone 2017-02-28 08:30:14 -05:00
Kevin K
677f323bce
tests: adds tests to ensure borrowed args don't break 2017-02-28 08:30:14 -05:00
Kevin K
0a922e5f61
tests: adds parsing cases to ripgrep bench 2017-02-28 08:30:14 -05:00
Kevin K
85a636d539
tests(Benches): adds real world benchmarks 2017-02-28 08:30:13 -05:00
Kevin K
0efa411963
perf: refactor to remove unneeded vectors and allocations and checks for significant performance increases
Building an `App` struct with a fair number of args/flags/switches, etc. (used ripgrep as test case)
went from taking ~21,000 ns to ~13,000ns.
2017-02-28 08:30:13 -05:00
Kevin K
b55cae5fdb
refactor: removes unused fields and moves some bools to bitfields 2017-02-28 08:30:09 -05:00
Homu
b336bdbbda Auto merge of #880 - frewsxcv:vec-map, r=kbknapp
Bump vec_map.

None
2017-02-28 22:26:58 +09:00
Corey Farwell
242020330d Bump vec_map. 2017-02-28 00:05:53 -05:00
Kevin K
10c1d1bd3e
Merge branch 'master' of github.com:kbknapp/clap-rs 2017-02-27 00:37:43 -05:00
Corey Farwell
5ee2665e7a Implement ExactSizeIterator for Values. (#877) 2017-02-26 23:20:52 -05:00
Igor Gnatenko
40052bdc0c switch to regex 0.2 (#876)
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-02-26 22:37:03 -05:00
Homu
389658d945 Auto merge of #875 - ignatenkobrain:patch-1, r=kbknapp
Cargo.toml: bump bitflags
2017-02-27 10:07:51 +09:00
Igor Gnatenko
d19d56e635 Cargo.toml: bump bitflags 2017-02-25 23:57:14 +01:00
Homu
6ec80662d3 Auto merge of #872 - kbknapp:patch-1b, r=kbknapp
Patch 1b
2017-02-23 12:00:38 +09:00
Kevin K
6bf94606c2
test: fixes failing doc test 2017-02-22 20:37:56 -05:00
Marco A L Barbosa
fa26d40a18 Fix missing line before code block 2017-02-22 11:25:10 -03:00
Kevin K
5568c072dc
Merge branch 'master' of github.com:kbknapp/clap-rs 2017-02-20 23:51:30 -05:00
Homu
53f3b65d24 Auto merge of #867 - kbknapp:stop-the-leaks, r=kbknapp
Stop the leaks
2017-02-21 13:50:35 +09:00
Kevin K
588f373ea8
chore: rustfmt run 2017-02-20 21:16:14 -05:00
Kevin K
8c2dd28718
fix: fixes some memory leaks when an error is detected and clap exits 2017-02-20 21:16:07 -05:00
Kevin K
416d6719a7
Merge branch 'master' of github.com:kbknapp/clap-rs 2017-02-20 21:09:29 -05:00
Kevin K
6b5725836f Merge branch 'master' into issues-833,849 2017-02-20 20:36:15 -05:00
Kevin K
1ae2110801
fix: fixes a trait that's marked private accidentlly, but should be crate internal public 2017-02-20 20:31:57 -05:00
Homu
f1ae47664b Auto merge of #865 - NickeZ:patch-1, r=kbknapp
Fix minor documentation bug
2017-02-21 10:30:20 +09:00
Kevin K
10ca4d1e21
chore: rustfmt run 2017-02-20 20:24:28 -05:00
Kevin K
a01812fed8
tests: adds tests for requiring the equals syntax in options 2017-02-20 20:24:28 -05:00
Kevin K
f002693dec
feat(Options): adds the ability to require the equals syntax with options --opt=val
Closes #833
2017-02-20 20:24:27 -05:00
Kevin K
e0f7722685
style: improves the style of doc tests and examples to increase readability and uniformity 2017-02-20 20:24:27 -05:00
Kevin K
0f2a378219
api: provides default_value_os and default_value_if[s]_os
One can now define default values that contain invalid UTF-8.

The underlying implementation has also been changed to use OsStrs in order to avoid duplication
of code and provide the new APIs basically for free.

Closes #849
2017-02-20 20:24:24 -05:00
Kevin K
fb7057cc7a
refactor(Arg): removes duplicate and uses Base, Switched, and Valued internally now 2017-02-20 19:06:36 -05:00
Kevin K
65b12f9107
chore: clippy run 2017-02-20 19:06:36 -05:00
Niklas Claesson
1971209c0c Fix minor documentation bug 2017-02-20 23:13:06 +01:00
Kevin K
e0f6b35187
Merge branch 'master' of github.com:kbknapp/clap-rs 2017-02-19 13:31:25 -05:00
Homu
e5159f77e7 Auto merge of #862 - pkgw:pr-atty, r=kbknapp
refactor: use the atty crate for isatty() detection

Not only does this remove some unsafe code from clap itself, `atty` does the right thing on Windows too. This isn't relevant now since we don't currently support colorized output on Windows, but will come in handy if/when we implement that feature (#836).
2017-02-20 03:30:39 +09:00
Peter Williams
68e03681d8 refactor: use the atty crate for isatty() detection
Not only does this remove some unsafe code from clap itself, `atty` does the
right thing on Windows too. This isn't relevant now since we don't currently
support colorized output on Windows, but will come in handy if/when we
implement that feature (#836).
2017-02-19 11:12:55 -05:00
Kevin K
595926382e
Merge branch 'master' of github.com:kbknapp/clap-rs 2017-02-18 11:45:48 -05:00
Kevin K
6f9a0baff2 chore: increase version (#858) 2017-02-18 11:45:30 -05:00
Kevin K
9626a1fbe7
chore: increase version 2017-02-18 11:44:38 -05:00
Homu
afd55dda1d Auto merge of #857 - eddyb:patch-1, r=kbknapp
Add missing fragment specifier to a clap_app! rule.

Introduced in #238, this bug affects both `clap` `1.*` and `2.*` and was found by rust-lang/rust#39419.
I'd suggest releasing not only `2.20.5`, but also `1.5.6`, to cover downstream crates still on `1.5.5`.
2017-02-19 01:39:53 +09:00
Eduard-Mihai Burtescu
f28b2353b2 Add missing fragment specifier to a clap_app! rule. 2017-02-18 12:03:41 +02:00
Homu
cb81ce59e5 Auto merge of #855 - pkgw:pr-testfix, r=kbknapp
tests: fix clap_app! doctest

I need these changes to get all of the tests to pass on Linux.
2017-02-17 11:13:46 +09:00
Peter Williams
e635658dad tests: fix clap_app! doctest 2017-02-16 10:48:34 -07:00
Kevin K
e3296e566b Docs (#854)
* docs(App::template) adds missing categories and fixes descriptions

* docs(clap_app): documents all the shorthand syntax

Closes #736

* chore: fixes crates.io category...hopefully
2017-02-16 09:44:44 -05:00
Homu
649f14a452 Auto merge of #852 - kbknapp:issue-846, r=kbknapp
Issue 846
2017-02-16 03:24:07 +09:00
Kevin K
31a6b17a92
chore: increase version 2017-02-15 11:06:48 -05:00
Kevin K
cb1818f23a
chore: fixes crates.io category 2017-02-15 11:04:55 -05:00