Skip to content

Commit

Permalink
Release v0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Mar 3, 2019
1 parent 59525f5 commit 4214afe
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 21 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,7 @@
# Unreleased

# 0.5.0 - 2019-03-03

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

* Reduce the feature of "std" crate feature. The current "std" crate feature only determines whether to enable `std` library's traits (e.g., `std::io::Read`) support. "std" crate feature is enabled by default, but you can reduce compile time by disabling this feature.
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "auto_enums"
# NB: When modifying, also modify html_root_url in lib.rs
version = "0.4.1"
version = "0.5.0"
authors = ["Taiki Endo <te316e89@gmail.com>"]
edition = "2018"
license = "Apache-2.0/MIT"
Expand All @@ -25,12 +25,12 @@ members = [
travis-ci = { repository = "taiki-e/auto_enums" }

[dependencies.auto_enums_core]
version = "0.4.1"
version = "0.5.0"
path = "core"
default-features = false

[dependencies.auto_enums_derive]
version = "0.4.1"
version = "0.5.0"
path = "derive"
default-features = false

Expand Down
16 changes: 5 additions & 11 deletions README.md
Expand Up @@ -24,20 +24,18 @@ Add this to your `Cargo.toml`:

```toml
[dependencies]
auto_enums = "0.4"
auto_enums = "0.5"
```

Now, you can use auto_enums:

```rust
use auto_enums::auto_enum;
```
The current version of easytime requires Rust 1.31 or later.

## Examples

`#[auto_enum]`'s basic feature is to wrap the value returned by the last if or match expression by an enum that implemented the specified traits.

```rust
use auto_enums::auto_enum;

#[auto_enum(Iterator)]
fn foo(x: i32) -> impl Iterator<Item = i32> {
match x {
Expand All @@ -59,7 +57,7 @@ Code like this will be generated:

```rust
fn foo(x: i32) -> impl Iterator<Item = i32> {
#[enum_derive(Iterator)]
#[::auto_enums::enum_derive(Iterator)]
enum __Enum1<__T1, __T2> {
__T1(__T1),
__T2(__T2),
Expand Down Expand Up @@ -186,10 +184,6 @@ You can add support for external library by activating the each crate feature.

* [`serde::Serialize`](https://docs.serde.rs/serde/trait.Serialize.html) - [generated code](docs/supported_traits/external/serde/serialize.md)

## Rust Version

The current minimum required Rust version is 1.31.

## License

Licensed under either of
Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "auto_enums_core"
# NB: When modifying, also modify html_root_url in lib.rs
version = "0.4.1"
version = "0.5.0"
authors = ["Taiki Endo <te316e89@gmail.com>"]
edition = "2018"
license = "Apache-2.0/MIT"
Expand Down
2 changes: 1 addition & 1 deletion core/src/lib.rs
@@ -1,6 +1,6 @@
#![crate_type = "proc-macro"]
#![recursion_limit = "256"]
#![doc(html_root_url = "https://docs.rs/auto_enums_core/0.4.1")]
#![doc(html_root_url = "https://docs.rs/auto_enums_core/0.5.0")]
#![deny(unsafe_code)]
#![deny(rust_2018_idioms, unreachable_pub)]

Expand Down
2 changes: 1 addition & 1 deletion derive/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "auto_enums_derive"
# NB: When modifying, also modify html_root_url in lib.rs
version = "0.4.1"
version = "0.5.0"
authors = ["Taiki Endo <te316e89@gmail.com>"]
edition = "2018"
license = "Apache-2.0/MIT"
Expand Down
2 changes: 1 addition & 1 deletion derive/src/lib.rs
@@ -1,6 +1,6 @@
#![crate_type = "proc-macro"]
#![recursion_limit = "256"]
#![doc(html_root_url = "https://docs.rs/auto_enums_derive/0.4.1")]
#![doc(html_root_url = "https://docs.rs/auto_enums_derive/0.5.0")]
#![deny(unsafe_code)]
#![deny(rust_2018_idioms, unreachable_pub)]

Expand Down
7 changes: 4 additions & 3 deletions src/lib.rs
Expand Up @@ -16,7 +16,8 @@
//!
//! ```rust
//! # #![cfg_attr(feature = "try_trait", feature(try_trait))]
//! # use auto_enums::auto_enum;
//! use auto_enums::auto_enum;
//!
//! #[auto_enum(Iterator)]
//! fn foo(x: i32) -> impl Iterator<Item = i32> {
//! match x {
Expand All @@ -41,7 +42,7 @@
//! # #![cfg_attr(feature = "try_trait", feature(try_trait))]
//! # use auto_enums::enum_derive;
//! fn foo(x: i32) -> impl Iterator<Item = i32> {
//! #[enum_derive(Iterator)]
//! #[::auto_enums::enum_derive(Iterator)]
//! enum __Enum1<__T1, __T2> {
//! __T1(__T1),
//! __T2(__T2),
Expand Down Expand Up @@ -825,7 +826,7 @@
//!

#![recursion_limit = "256"]
#![doc(html_root_url = "https://docs.rs/auto_enums/0.4.1")]
#![doc(html_root_url = "https://docs.rs/auto_enums/0.5.0")]
#![deny(unsafe_code)]
#![deny(rust_2018_idioms, unreachable_pub)]
#![no_std]
Expand Down

0 comments on commit 4214afe

Please sign in to comment.