Skip to content

Commit

Permalink
Bump minimum rustc version to 1.36
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Pinot committed Aug 30, 2019
1 parent b57dde1 commit 673dbcc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: rust
cache: cargo
matrix:
include:
- rust: 1.34.0
- rust: 1.36.0
- rust: stable
- rust: beta
- rust: nightly
Expand Down
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# v0.3.0 (2019-06-XX)
# v0.3.0 (2019-08-30)

## Breaking changes

### Bump minimum rustc version to 1.34 by [@TeXitoi](https://github.com/TeXitoi)
Now `rustc` 1.34 is the minimum compiler version supported by `structopt`,
### Bump minimum rustc version to 1.36 by [@TeXitoi](https://github.com/TeXitoi)
Now `rustc` 1.36 is the minimum compiler version supported by `structopt`,
it likely won't work with older compilers.

### Remove "nightly" feature
Expand Down
9 changes: 1 addition & 8 deletions structopt-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,11 @@ fn gen_augmentation(

let (parser, f) = attrs.parser();
let validator = match **parser {
// clippy v0.0.212 (1fac380 2019-02-20) produces `redundant_closure` warnings
// for `.map_err(|e| e.to_string())` when `e` is a reference
// (e.g. `&'static str`). To suppress the warning, we have to write
// `|e| (&e).to_string()` since `e` may be a reference or non-reference.
// When Rust 1.35 is released, this hack will be obsolete because the next
// stable clippy is going to stop triggering the warning for macros.
// https://github.com/rust-lang/rust-clippy/pull/3816
Parser::TryFromStr => quote! {
.validator(|s| {
#f(&s)
.map(|_: #convert_type| ())
.map_err(|e| (&e).to_string())
.map_err(|e| e.to_string())
})
},
Parser::TryFromOsStr => quote! {
Expand Down

0 comments on commit 673dbcc

Please sign in to comment.