Skip to content

Commit 02baaed

Browse files
nozwocksdroege
authored andcommitted
Derive Default for MyEnum in example of Properties macro
1 parent cce148b commit 02baaed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

glib-macros/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,9 +1445,10 @@ pub fn cstr_bytes(item: TokenStream) -> TokenStream {
14451445
/// nick: String,
14461446
/// }
14471447
///
1448-
/// #[derive(Debug, Copy, Clone, PartialEq, Eq, glib::Enum)]
1448+
/// #[derive(Debug, Copy, Clone, PartialEq, Eq, glib::Enum, Default)]
14491449
/// #[enum_type(name = "MyEnum")]
1450-
/// enum MyEnum {
1450+
/// pub enum MyEnum {
1451+
/// #[default]
14511452
/// Val,
14521453
/// OtherVal
14531454
/// }

0 commit comments

Comments
 (0)