Skip to content

Commit

Permalink
Merge pull request #1143 from kbknapp/trim-fat
Browse files Browse the repository at this point in the history
Trim fat
  • Loading branch information
kbknapp authored Jan 9, 2018
2 parents 28a55f2 + 3fef176 commit d78341f
Show file tree
Hide file tree
Showing 22 changed files with 464 additions and 456 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ Cargo.lock

# Project files
.vscode/*
.idea/*
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
<a name="2.29.1"></a>
### 2.29.1 (2018-01-09)


#### Documentation

* fixes broken links. ([56e734b8](https://github.com/kbknapp/clap-rs/commit/56e734b839303d733d2e5baf7dac39bd7b97b8e4))
* updates contributors list ([e1313a5a](https://github.com/kbknapp/clap-rs/commit/e1313a5a0f69d8f4016f73b860a63af8318a6676))

#### Performance

* further debloating by removing generics from error cases ([eb8d919e](https://github.com/kbknapp/clap-rs/commit/eb8d919e6f3443db279ba0c902f15d76676c02dc))
* debloats clap by deduplicating logic and refactors ([03e413d7](https://github.com/kbknapp/clap-rs/commit/03e413d7175d35827cd7d8908d47dbae15a849a3))

#### Bug Fixes

* fixes the ripgrep benchmark by adding a value to a flag that expects it ([d26ab2b9](https://github.com/kbknapp/clap-rs/commit/d26ab2b97cf9c0ea675b440b7b0eaf6ac3ad01f4))
* **bash completion:** Change the bash completion script code generation to support hyphens. ([ba7f1d18](https://github.com/kbknapp/clap-rs/commit/ba7f1d18eba7a07ce7f57e0981986f66c994b639))
* **completions/zsh.rs:** Fix completion of long option values ([46365cf8](https://github.com/kbknapp/clap-rs/commit/46365cf8be5331ba04c895eb183e2f230b5aad51))


<a name="2.29.0"></a>
## 2.29.0 (2017-12-02)

Expand Down
62 changes: 31 additions & 31 deletions CONTRIBUTORS.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "clap"
version = "2.29.0"
version = "2.29.1"
authors = ["Kevin K. <[email protected]>"]
exclude = ["examples/*", "clap-test/*", "tests/*", "benches/*", "*.png", "clap-perf/*", "*.dot"]
repository = "https://github.com/kbknapp/clap-rs"
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)

## What's New

Here's whats new in 2.29.1:

* Debloats clap by deduplicating logic and refactors for a ~57% decrease in code size! This is with zero functinoality lost, and a slight perf increase!
* Change the bash completion script code generation to support hyphens.
* Fix completion of long option values in ZSH completions
* Fixes broken links in docs
* Updates contributors list
* Fixes the ripgrep benchmark by adding a value to a flag that expects it

Here's whats new in 2.29.0:

* **Arg:** adds Arg::hide_env_values(bool) which allows one to hide any current env values and display only the key in help messages
Expand Down Expand Up @@ -301,7 +310,7 @@ subcommands:
Since this feature requires additional dependencies that not everyone may want, it is *not* compiled in by default and we need to enable a feature flag in Cargo.toml:
Simply change your `clap = "2.29"` to `clap = {version = "2.87", features = ["yaml"]}`.
Simply change your `clap = "2.29"` to `clap = {version = "2.29", features = ["yaml"]}`.

Finally we create our `main.rs` file just like we would have with the previous two examples:

Expand Down
2 changes: 1 addition & 1 deletion benches/05_ripgrep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn parse_complex(b: &mut Bencher) {
app_short().get_matches_from(vec!["rg",
"pat",
"-cFlN",
"-pqr",
"-pqr=some",
"--null",
"--no-filename",
"--no-messages",
Expand Down
10 changes: 10 additions & 0 deletions clap-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ mod test {
assert_eq!(stderr, err.use_stderr());
compare(left, right)
}
pub fn compare_output2(l: App, args: &str, right1: &str, right2: &str, stderr: bool) -> bool {
let mut buf = Cursor::new(Vec::with_capacity(50));
let res = l.get_matches_from_safe(args.split(' ').collect::<Vec<_>>());
let err = res.unwrap_err();
err.write_to(&mut buf).unwrap();
let content = buf.into_inner();
let left = String::from_utf8(content).unwrap();
assert_eq!(stderr, err.use_stderr());
compare(&*left, right1) || compare(&*left, right2)
}

// Legacy tests from the pyhton script days

Expand Down
165 changes: 0 additions & 165 deletions src/app/macros.rs

This file was deleted.

2 changes: 0 additions & 2 deletions src/app/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
mod settings;
#[macro_use]
mod macros;
pub mod parser;
mod meta;
mod help;
Expand Down
Loading

0 comments on commit d78341f

Please sign in to comment.