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

Weaken requirements to a number of enum variants #15

Merged
merged 1 commit into from
Sep 15, 2019

Conversation

blackbeam
Copy link
Contributor

Hi.

This PR is a straightforward fix for the issue where the following snippet of code won't compile with error: cannot be implemented for enums with less than two variants:

#[derive(Read, Write)]
enum Stream {
    Some(SomeStream),
    #[cfg(features = "other")]
    Other(OtherStream),
}

@taiki-e
Copy link
Owner

taiki-e commented Sep 15, 2019

Looks good, thanks!

bors r+

bors bot added a commit that referenced this pull request Sep 15, 2019
15: Weaken requirements to a number of enum variants r=taiki-e a=blackbeam

Hi.

This PR is a straightforward fix for the issue where the following snippet of code won't compile with `error: cannot be implemented for enums with less than two variants`:

```rust
#[derive(Read, Write)]
enum Stream {
    Some(SomeStream),
    #[cfg(features = "other")]
    Other(OtherStream),
}
```



Co-authored-by: Anatoly Ikorsky <aikorsky@gmail.com>
@bors
Copy link
Contributor

bors bot commented Sep 15, 2019

Build succeeded

  • taiki-e.derive_utils

@bors bors bot merged commit b927c0e into taiki-e:master Sep 15, 2019
@taiki-e
Copy link
Owner

taiki-e commented Sep 15, 2019

Published in 0.9.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants