mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style_derive: Allow css(iterable) to work on non-functions too, as long as there's only one binding.
This commit is contained in:
parent
c9e3fabdfd
commit
09a3db8657
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ pub fn derive(input: DeriveInput) -> Tokens {
|
||||||
|
|
||||||
let mut expr = if !bindings.is_empty() {
|
let mut expr = if !bindings.is_empty() {
|
||||||
let mut expr = quote! {};
|
let mut expr = quote! {};
|
||||||
if variant_attrs.function && variant_attrs.iterable {
|
if variant_attrs.iterable {
|
||||||
assert_eq!(bindings.len(), 1);
|
assert_eq!(bindings.len(), 1);
|
||||||
let binding = &bindings[0];
|
let binding = &bindings[0];
|
||||||
expr = quote! {
|
expr = quote! {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue