Skip to content

Commit 71f754c

Browse files
committed
GdExtension and class icons defined by macro attributes
1 parent 3c74553 commit 71f754c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

godot-macros/src/gdextension.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ pub fn attribute_gdextension(item: venial::Item) -> ParseResult<TokenStream> {
5252
let impl_ty = &impl_decl.self_ty;
5353

5454
let mut modifiers = Vec::new();
55-
if icon.is_some() {
56-
let icon_expr = icon.unwrap();
57-
modifiers.push(quote! { with_icon(#icon_expr) });
55+
if let Some(icon) = icon {
56+
modifiers.push(quote! { with_icon(#icon) });
5857
}
5958

6059
let extension_config_registration = quote! {

0 commit comments

Comments
 (0)