We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c88790 commit 16644daCopy full SHA for 16644da
derive/src/pyclass.rs
@@ -16,11 +16,11 @@ enum ClassItem {
16
},
17
}
18
19
-fn meta_to_vec(meta: Meta) -> Result<Vec<NestedMeta>, Meta> {
+fn meta_to_vec(meta: Meta) -> Option<Vec<NestedMeta>> {
20
match meta {
21
- Meta::Word(_) => Ok(Vec::new()),
22
- Meta::List(list) => Ok(list.nested.into_iter().collect()),
23
- Meta::NameValue(_) => Err(meta),
+ Meta::Word(_) => Some(Vec::new()),
+ Meta::List(list) => Some(list.nested.into_iter().collect()),
+ Meta::NameValue(_) => None,
24
25
26
0 commit comments