Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition to Rust 2018 #2

Merged
merged 3 commits into from Jun 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .rustfmt.toml
@@ -1 +1,3 @@
edition = "2018"
tab_spaces = 4
use_small_heuristics = "Max"
27 changes: 15 additions & 12 deletions .travis.yml
Expand Up @@ -2,37 +2,38 @@ language: rust
sudo: false
cache: cargo

branches:
only:
- master
- staging
- trying

matrix:
fast_finish: true

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 @@ -45,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
17 changes: 7 additions & 10 deletions Cargo.toml
Expand Up @@ -3,14 +3,15 @@ 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"
documentation = "https://docs.rs/iterator-enum/"
readme = "README.md"
keywords = ["iterator", "derive", "enum"]
categories = ["rust-patterns"]
exclude = ["/.travis.yml"]
exclude = ["/.travis.yml", "/bors.toml"]

[badges]
# https://github.com/rust-lang/crates.io/issues/1392
Expand All @@ -20,9 +21,7 @@ exclude = ["/.travis.yml"]
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
1 change: 1 addition & 0 deletions bors.toml
@@ -0,0 +1 @@
status = ["continuous-integration/travis-ci/push"]