Commit graph

2996 commits

Author SHA1 Message Date
bors[bot]
5e0898c175
Merge #1718
1718: Fix core dump with mutually `requires()` args r=pksunkara a=CreepySkeleton



Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-03-04 12:51:19 +00:00
CreepySkeleton
839ed2588c Fix core dump with mutually requires() args
Fixes #1643
2020-03-04 15:21:06 +03:00
bors[bot]
7669d54454
Merge #1716
1716: Unit struct r=CreepySkeleton a=pksunkara



Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-03-02 16:36:17 +00:00
Pavan Kumar Sunkara
d8d29aea13 Remove every proc_macro_derive except Clap 2020-03-02 16:28:35 +01:00
Pavan Kumar Sunkara
804639ca67 Rename labels in bors 2020-03-02 11:47:08 +01:00
Pavan Kumar Sunkara
0c22a9df6c Added support for unit-struct 2020-03-02 11:46:40 +01:00
bors[bot]
68566a6848
Merge #1713
1713: fix: bash completions with app name which contains `-` r=CreepySkeleton a=pksunkara



Co-authored-by: quake wang <quake.wang@gmail.com>
2020-03-02 07:36:22 +00:00
bors[bot]
9eed0bf80f
Merge #1712
1712: Make cargo feature additive r=CreepySkeleton a=pksunkara



Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-03-02 07:11:06 +00:00
bors[bot]
e8e9be229f
Merge #1714
1714: Allow bench to fail in travis to reduce CI time r=CreepySkeleton a=pksunkara



Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-03-02 06:46:54 +00:00
Pavan Kumar Sunkara
2055e0d1ee Allow bench to fail in travis to reduce CI time 2020-03-01 23:39:24 +01:00
quake wang
bb4a6df5ba fix: bash completions with app name which contains - 2020-03-01 23:35:49 +01:00
Pavan Kumar Sunkara
47782cfac6 Make cargo feature additive 2020-03-01 22:55:57 +01:00
bors[bot]
cb29d1d547
Merge #1710
1710: Ambiguous suggetions for InferSubcommands r=CreepySkeleton,pksunkara a=pickfire



Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-03-01 14:43:41 +00:00
Ivan Tham
908b7aeb44 Ambiguous suggetions for InferSubcommands
Closes #1655
2020-03-01 19:36:05 +08:00
bors[bot]
c192f5effb
Merge #1709
1709: Tidy up the bug report template r=pksunkara a=CreepySkeleton



Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-29 16:08:01 +00:00
CreepySkeleton
3c321a75d0
Tidy up the bug report template 2020-02-29 12:24:15 +03:00
bors[bot]
4aaddf8375
Merge #1706
1706: Fix Clap::try_parse_from documentation r=pksunkara a=emilazy



Co-authored-by: Emily <vcs@emily.moe>
2020-02-27 12:48:46 +00:00
Emily
d36277b644
Fix Clap::try_parse_from documentation 2020-02-25 16:50:47 +00:00
bors[bot]
e4a7f50128
Merge #1669
1669: refactor: Rename Arg::conflicts_with_everything to Arg::exclusive (#1… r=pksunkara a=CreepySkeleton



Co-authored-by: Gregor Pfeifer <gpfeifer@dxc.com>
2020-02-22 21:58:29 +00:00
bors[bot]
7badb768bc
Merge #1703
1703: Changes to bors r=CreepySkeleton a=pksunkara



Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-02-22 19:46:06 +00:00
Pavan Kumar Sunkara
e93ea28971 Changes to bors 2020-02-22 19:39:13 +01:00
bors[bot]
28c46b5965
Merge #1697
1697: Allow replacing input on the fly r=CreepySkeleton a=pksunkara



Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-02-21 19:13:59 +00:00
Pavan Kumar Sunkara
b8851a7d5e Allow replacing input on the fly 2020-02-21 18:15:33 +01:00
bors[bot]
443cba97ee
Merge #1698
1698: Fix benchmarks r=pksunkara a=CreepySkeleton



Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-21 16:52:29 +00:00
CreepySkeleton
57ca48847a Run benches on stable 2020-02-21 18:21:57 +03:00
CreepySkeleton
edcb84b3c1 rustfmt 2020-02-21 18:21:32 +03:00
CreepySkeleton
8ca1c22981 Good names for CI + cleanup 2020-02-21 18:21:32 +03:00
CreepySkeleton
9d1cf49ca8 Move to criterion 2020-02-21 18:21:31 +03:00
bors[bot]
869ecb1188
Merge #1702
1702: Allow missing docs on arg_enum r=pksunkara a=cecton



Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
2020-02-21 12:22:49 +00:00
Cecile Tonglet
35b918bd72 Allow missing docs on arg_enum 2020-02-21 11:39:44 +01:00
bors[bot]
cc79c432a4
Merge #1701
1701: Remove unneeded file r=pksunkara a=CreepySkeleton



Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-21 09:51:56 +00:00
bors[bot]
a3b0f4825e
Merge #1700
1700: Fix warnings on nightly r=pksunkara a=CreepySkeleton



Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-21 00:30:34 +00:00
CreepySkeleton
4fcff089ef Remove unneeded file 2020-02-21 03:28:25 +03:00
CreepySkeleton
4f13f3155c Fix warnings on nightly 2020-02-21 01:55:19 +03:00
bors[bot]
bbb14f8bd4
Merge #1691
1691: Update issue templates r=pksunkara a=CreepySkeleton



Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-14 02:14:16 +00:00
CreepySkeleton
280382cb2f Pull request template and fix bors 2020-02-14 02:00:00 +03:00
CreepySkeleton
3bd3301e76
Update feature_request.md 2020-02-14 00:36:03 +03:00
CreepySkeleton
003047617c
Update bug_report.md 2020-02-14 00:16:57 +03:00
CreepySkeleton
b9917b02a7
Update feature_request.md 2020-02-14 00:15:45 +03:00
CreepySkeleton
9daa84c841
Update bug_report.md 2020-02-14 00:11:59 +03:00
CreepySkeleton
23bb900dca Update issue templates 2020-02-13 23:43:23 +03:00
bors[bot]
6910a93ee7
Merge #1690
1690: Improve error messages a bit  r=pksunkara a=CreepySkeleton



Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-13 20:36:36 +00:00
CreepySkeleton
3f314ce39e Use full span information whenever possible 2020-02-13 21:47:42 +03:00
CreepySkeleton
9a15e47af0 Fix dummy implementations 2020-02-13 21:46:33 +03:00
bors[bot]
a2dfbec2bc
Merge #1689
1689: Remove some mentioning of structopt r=TeXitoi a=CreepySkeleton

A work on #1671. Attention! It doesn't close it just yet

Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-13 17:37:28 +00:00
bors[bot]
956b4119f5
Merge #1688
1688: Implement derive traits for Box<T> r=pksunkara a=CreepySkeleton

Closes #1674 

Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-13 15:44:50 +00:00
CreepySkeleton
28ef1e91d4
Remove some mentioning of structopt 2020-02-13 18:29:51 +03:00
CreepySkeleton
43acfa00f4
Implement derive traits for Box<T> 2020-02-13 18:21:01 +03:00
bors[bot]
1e7c9efc9d
Merge #1612
1612: Use about() with help() and long_about() with long_help() r=pksunkara a=TheLostLambda

I was going through the clap documentation and was under the impression that calling `help()` would call `about()` and `long_help()` would call `long_about()`, but I've actually discovered this not to be the case. Instead, the `long_about()` was always shown when it existed, rendering the output (in the about section) of programs called with `-h` and `--help` identical. Issue #1472 shows this and that is fixed here.

Note this doesn't remove the ability to use the same about in both cases: if `long_about()` is unset, then `about()` is used in both cases.

I've changed the implementation here to use `is_some()` and `unwrap()` as opposed to `if let` because it ultimately allows for less repetitive code. Ideally, I'd be able to pair `if let` with a secondary condition (namely `self.use_long`), but to my dismay, let-chains are not stabilized yet.

For a second opinion, here is the code a settled on:
```
if self.use_long && parser.meta.long_about.is_some() {
    debugln!("Help::write_default_help: writing long about");
    write_thing!(parser.meta.long_about.unwrap())
} else if parser.meta.about.is_some() {
    debugln!("Help::write_default_help: writing about");
    write_thing!(parser.meta.about.unwrap())
}
```
Here is the alternative:
```
if self.use_long {
    if let Some(about) = parser.meta.long_about {
        debugln!("Help::write_default_help: writing long about");
        write_thing!(about)
    } else if let Some(about) = parser.meta.about {
        debugln!("Help::write_default_help: writing about");
        write_thing!(about)
   }
} else {
    if let Some(about) = parser.meta.about {
        debugln!("Help::write_default_help: writing about");
        write_thing!(about)
    }
}
```

Co-authored-by: Brooks J Rady <b.j.rady@gmail.com>
2020-02-13 07:21:05 +00:00
Brooks J Rady
9cde072b61 Use about() with help() and long_about() with long_help() 2020-02-13 00:31:45 +00:00