Skip to content

Commit

Permalink
Transition to Rust 2018
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jun 16, 2019
1 parent eb1e573 commit b18afbc
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 131 deletions.
21 changes: 9 additions & 12 deletions .travis.yml
Expand Up @@ -14,31 +14,26 @@ matrix:
include:
# This is the minimum Rust version supported by iterator-enum.
# When updating this, the reminder to update the minimum required version in README.md.
- rust: 1.30.0
- rust: 1.31.0

- rust: stable
- rust: beta
- rust: nightly
script:
- cargo test
- cargo test --no-default-features
- cargo test --all-features

- rust: nightly
name: cargo test (minimal versions)
name: cargo check (minimal versions)
script:
- cargo update -Zminimal-versions
- cargo test --all-features
- cargo check --all-features

- rust: nightly
name: cargo clippy
script:
- if rustup component add clippy-preview;
then
cargo clippy --all-features -- -Dwarnings;
else
echo 'Skipping clippy';
fi
- rustup component add clippy || travis_terminate 0
- cargo clippy --all --all-features --tests

- rust: stable
name: cargo fmt
Expand All @@ -51,12 +46,14 @@ matrix:
script:
- RUSTDOCFLAGS=-Dwarnings cargo doc --no-deps --all-features

env:
- RUSTFLAGS=-Dwarnings

before_script:
- set -o errexit

script:
- cargo test
- cargo test --no-default-features
- cargo check

notifications:
email:
Expand Down
10 changes: 8 additions & 2 deletions CHANGELOG.md
@@ -1,10 +1,16 @@
# Unreleased

* Transition to Rust 2018. With this change, the minimum required version will go up to Rust 1.31.

* Removed `"std"` crate feature. This crate can generate accurate code without `"std"` feature.

* Updated minimum `derive_utils` version to 0.7.2.

# 0.1.2 - 2019-02-05

* Update minimum derive_utils version to 0.6.3.
* Update minimum `derive_utils` version to 0.6.3.

* Update minimum syn version to 0.15.22.
* Update minimum `syn` version to 0.15.22.

# 0.1.1 - 2019-02-03

Expand Down
15 changes: 6 additions & 9 deletions Cargo.toml
Expand Up @@ -3,6 +3,7 @@ name = "iterator-enum"
# NB: When modifying, also modify html_root_url in lib.rs
version = "0.1.2"
authors = ["Taiki Endo <te316e89@gmail.com>"]
edition = "2018"
license = "Apache-2.0/MIT"
description = "#[derive(Iterator, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Extend)] for enums."
repository = "https://github.com/taiki-e/iterator-enum"
Expand All @@ -20,9 +21,7 @@ exclude = ["/.travis.yml", "/bors.toml"]
proc-macro = true

[features]
default = ["std"]
# Use `std` library.
std = []
default = []
# Make iterator implementation more effective.
try_trait = []
# #[derive(TrustedLen)]
Expand All @@ -31,9 +30,7 @@ trusted_len = []
exact_size_is_empty = []

[dependencies]
derive_utils = "^0.6.3"
quote = "^0.6.8"
syn = { version = "^0.15.22", features = ["full"] }

[package.metadata.docs.rs]
all-features = true
derive_utils = "0.7.2"
proc-macro2 = "0.4.13"
quote = "0.6.8"
syn = { version = "0.15.29", features = ["full"] }
6 changes: 2 additions & 4 deletions README.md
Expand Up @@ -4,7 +4,7 @@
[![version](https://img.shields.io/crates/v/iterator-enum.svg)](https://crates.io/crates/iterator-enum/)
[![documentation](https://docs.rs/iterator-enum/badge.svg)](https://docs.rs/iterator-enum/)
[![license](https://img.shields.io/crates/l/iterator-enum.svg)](https://crates.io/crates/iterator-enum/)
[![Rustc Version](https://img.shields.io/badge/rustc-1.30+-lightgray.svg)](https://blog.rust-lang.org/2018/10/25/Rust-1.30.0.html)
[![Rustc Version](https://img.shields.io/badge/rustc-1.31+-lightgray.svg)](https://blog.rust-lang.org/2018/12/06/Rust-1.31-and-rust-2018.html)

\#\[derive(Iterator, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Extend)\] for enums.

Expand All @@ -17,7 +17,7 @@ Add this to your `Cargo.toml`:
iterator-enum = "0.1"
```

The current version of iterator-enum requires Rust 1.30 or later.
The current iterator-enum requires Rust 1.31 or later.

## Examples

Expand Down Expand Up @@ -50,8 +50,6 @@ See [auto_enums](https://github.com/taiki-e/auto_enums) for how to automate patt
* [`TrustedLen`](https://doc.rust-lang.org/std/iter/trait.TrustedLen.html) (*requires `"trusted_len"` crate feature*)
* [`Extend`](https://doc.rust-lang.org/std/iter/trait.Extend.html)

See [this issue](https://github.com/taiki-e/auto_enums/issues/11) for other traits.

## License

Licensed under either of
Expand Down

0 comments on commit b18afbc

Please sign in to comment.