style_derive: Allow css(iterable) to work on non-functions too, as long as there's only one binding.

This commit is contained in:
Emilio Cobos Álvarez 2017-12-16 21:47:07 +01:00
parent c9e3fabdfd
commit 09a3db8657
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -27,7 +27,7 @@ pub fn derive(input: DeriveInput) -> Tokens {
let mut expr = if !bindings.is_empty() {
let mut expr = quote! {};
if variant_attrs.function && variant_attrs.iterable {
if variant_attrs.iterable {
assert_eq!(bindings.len(), 1);
let binding = &bindings[0];
expr = quote! {