Commit graph

2863 commits

Author SHA1 Message Date
CreepySkeleton
c40eb88d5b Less another one 2020-02-05 09:35:01 +03:00
CreepySkeleton
c7c7e5113c One less hack 2020-02-05 09:34:23 +03:00
Cecile Tonglet
8f3eb4623e Implemented: flatten on enums
Fixes #327
2020-02-05 09:10:59 +03:00
CreepySkeleton
afac737f69 Minor refactoring 2020-02-04 19:02:29 +03:00
CreepySkeleton
596bdec856 Bugfix #324
Fixes https://github.com/TeXitoi/structopt/issues/324
2020-02-04 17:07:39 +03:00
bors[bot]
5d28761630
Merge #1667
1667: Several things r=CreepySkeleton a=pksunkara

* Updated `Cargo.toml` for both crates to be consistent with each other
  * Removed `exclude` key since it is exclusive with `include`
  * Remove things from profiles when they are using default values anyway
* Used `workspace.default-members`
* Cherry pick [this](a525b57cb5) commit from 2.x branch which does not exist in master
* Put the test helper into `tests` folder.

  > The old tests used the include!() macro, which is quite hacky, and hurts compile times

Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Co-authored-by: rleungx <rleungx@gmail.com>
2020-02-04 10:16:40 +00:00
Pavan Kumar Sunkara
b7f76d8e8d Put the test helper in tests 2020-02-04 09:51:46 +01:00
rleungx
4082d1e85c exactly match a subcommand when using the infersubcommands 2020-02-04 09:41:05 +01:00
Pavan Kumar Sunkara
49f096dab2 Use workspace.default-members 2020-02-04 09:41:05 +01:00
CreepySkeleton
cf11d46373 Default value for default_value (yeah, sounds awkward) 2020-02-04 11:40:01 +03:00
Pavan Kumar Sunkara
4d2c8ffa6b Update Cargo.toml files 2020-02-04 09:11:33 +01:00
CreepySkeleton
5aafe9eaaf Pre release tweaks and changelog 2020-02-04 11:10:47 +03:00
bors[bot]
f08d786638
Merge #1628
1628: Macro use removal r=pksunkara a=avandesa

[As of Rust 2018][macro changes], there is no need to call `#[macro_use] extern crate foo` to import the macros from crate `foo`.

This pull request removes mentions of `#[macro_use]` from documentation examples, tests, and benchmarks, in favor of importing the macros directly.

The PR cuts down the number of instances of `#[macro_use]` from 39 down to one, required for importing in-crate macros.

[macro changes]: https://doc.rust-lang.org/nightly/edition-guide/rust-2018/macros/macro-changes.html#macro_rules-style-macros

Co-authored-by: Alex van de Sandt <alex@avandesa.dev>
2020-02-03 18:41:37 +00:00
Alex van de Sandt
050bb7484a Fix formatting 2020-02-03 13:04:07 -05:00
Alex van de Sandt
47031213a2 Remove needless fn main from doc tests 2020-02-03 12:31:24 -05:00
Alex van de Sandt
928ded9d42 Revert "Remove #[macro_use] from src"
This reverts commit 7dcdfc8b231b41a46d4d7ab7ec2664d32804b4a3.

That commit caused doc tests to break, as well as issues with importing
macros in other modules. Note that the yaml example in `src/lib.rs` at
line 184 is broken and should probably be fixed.
2020-02-03 12:04:13 -05:00
Alex van de Sandt
fd6b32ff55 Remove #[macro_use] from src 2020-02-03 12:04:13 -05:00
Alex van de Sandt
90bdd12764 Remove #[macro_use] from benchmarks 2020-02-03 12:01:36 -05:00
Alex van de Sandt
e068826e62 Remove mention of macro_use in doc comment 2020-02-03 12:01:36 -05:00
Alex van de Sandt
1055bbe4aa Remove #[macro_use] from tests 2020-02-03 12:01:36 -05:00
Alex van de Sandt
81b8bdd7fc Remove #[macro_use] from examples 2020-02-03 12:01:36 -05:00
CreepySkeleton
3b11f9af25 Consistent doc comments (#296) 2020-02-03 18:20:08 +03:00
CreepySkeleton
0851fb0266 Introduce #[structopt(rename_all_env)] 2020-02-03 17:56:17 +03:00
bors[bot]
f9818310e8
Merge #1653
1653: Revert " imp: Add exitcode::USAGE exit code as suggested in #1327" r=me a=Dylan-DPC

Reverts clap-rs/clap#1637

Co-authored-by: Dylan DPC <dylan.dpc@gmail.com>
Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-02-03 12:50:12 +00:00
Pavan Kumar Sunkara
c5eb08431a Apply suggestions from code review 2020-02-03 12:37:37 +01:00
Dylan DPC
a2ff3fa91b Revert " imp: Add exitcode::USAGE exit code as suggested in #1327" 2020-02-03 12:37:37 +01:00
bors[bot]
5dcc8e60b0
Merge #1658
1658: Faster CI r=CreepySkeleton a=pksunkara

* Moved away from appveyor to decrease the CI time using parallel jobs.
* Improved caching on travis (TODO: azure)

Don't mind the appveyor failing. I will remove those hooks once this PR is merged.

The total CI waiting time decreased from 1 hr to 15-20 mins.

Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-02-03 03:27:47 +00:00
Pavan Kumar Sunkara
6c338e42d0 Faster CI 2020-02-03 03:57:52 +01:00
bors[bot]
526fd73ded
Merge #1657
1657: added check for - r=CreepySkeleton a=Toothless204

Address #1600

Co-authored-by: Toothless204 <38069888+Toothless204@users.noreply.github.com>
2020-02-02 16:51:19 +00:00
Toothless204
ebdc0453eb
Update src/build/arg/mod.rs
make error message more descriptive

Co-Authored-By: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-02 12:19:55 +00:00
Toothless204
8b2a9928e8 added check for - 2020-02-02 11:48:35 +00:00
bors[bot]
6422930a18
Merge #1656
1656: Added tests for cargo macros, fixes #1478 r=pksunkara a=pksunkara

When you approve this PR, instead of merging it, please comment "bors r+". I want to test the bors workflow.

Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
2020-02-02 09:44:59 +00:00
Pavan Kumar Sunkara
3fa39a55d2 Update changelog to reflect the correct minimum version 2020-02-02 09:31:09 +01:00
Pavan Kumar Sunkara
506f5e4965 Added tests for cargo macros, fixes #1478 2020-02-02 08:50:40 +01:00
Pavan Kumar Sunkara
a81618ab86 Update bors.toml 2020-02-02 08:30:14 +01:00
Pavan Kumar Sunkara
25a16ea762
Merge pull request #1654 from clap-rs/bors
Bors
2020-02-02 07:00:29 +01:00
Dylan DPC
922a531fa6
Update lib.rs 2020-02-02 02:02:10 +01:00
Dylan DPC
6aaeb2718b
Update Cargo.toml 2020-02-02 01:28:19 +01:00
Pavan Kumar Sunkara
9453f74335 Added bors config 2020-02-01 21:50:29 +01:00
Pavan Kumar Sunkara
bd5b5adfb5 Cache stuff on appveyor 2020-02-01 21:24:44 +01:00
Pavan Kumar Sunkara
2c323503aa
Merge pull request #1651 from clap-rs/bump-yaml
Update yaml-rust to 0.4.1
2020-02-01 19:18:23 +01:00
nazarov A. V
dc4d2faf76 Update yaml-rust to 0.4.3 2020-02-01 14:45:52 +03:00
Pavan Kumar Sunkara
4740b1e05b
Merge pull request #1648 from clap-rs/maintain
Some maintainance stuff
2020-02-01 12:23:50 +01:00
Pavan Kumar Sunkara
8199e96268 chore: Update coverage job 2020-02-01 06:55:47 +01:00
Pavan Kumar Sunkara
2a6005657e Apply suggestions from code review
Co-Authored-By: CreepySkeleton <creepy-skeleton@yandex.ru>
2020-02-01 06:55:47 +01:00
Pavan Kumar Sunkara
53eb192c3f fix: CI configs 2020-02-01 06:48:50 +01:00
Pavan Kumar Sunkara
dd75cee72c fix: Clippy should pass 2020-02-01 06:48:50 +01:00
Daniel Eades
d23df44e84 refactor: remove deprecated 'Error::description' method 2020-01-31 18:37:56 +01:00
Pavan Kumar Sunkara
8e4a189ab0 fmt: Use standardized rustfmt rules 2020-01-31 18:37:56 +01:00
Pavan Kumar Sunkara
cfb60f7547 chore: Remove mention bot since it's not working' 2020-01-31 18:37:56 +01:00