From 09a3db8657961a0a4e20b7f296c1339175ab4c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 16 Dec 2017 21:47:07 +0100 Subject: [PATCH] style_derive: Allow css(iterable) to work on non-functions too, as long as there's only one binding. --- components/style_derive/to_css.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/style_derive/to_css.rs b/components/style_derive/to_css.rs index 02a44617bde..12fad8f0d34 100644 --- a/components/style_derive/to_css.rs +++ b/components/style_derive/to_css.rs @@ -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! {