fix spreading attributes

This commit is contained in:
Evan Almloff committed 2024-01-16 11:04:37 -06:00
1 parent d44b0b34c8
commit 8d14671520
5 files changed
+8 -55

No files matched your search

+2 -2
View File
@@ -38,8 +38,8 @@ impl AttributeType {
impl ToTokens for AttributeType {
fn to_tokens(&self, tokens: &mut TokenStream2) {
match self {
AttributeType::Named(n) => tokens.append_all(quote! { #n }),
AttributeType::Spread(e) => tokens.append_all(quote! { (&#e).into() }),
AttributeType::Named(n) => tokens.append_all(quote! { Box::new([#n]) }),
AttributeType::Spread(e) => tokens.append_all(quote! { #e.into_boxed_slice() }),
}
}
}