Skip to content

Commit 5676568

Browse files
authored
Merge pull request RustPython#826 from RustPython/joey/fix-compile
Fix sub-crate compilation
2 parents be4e317 + 16644da commit 5676568

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

derive/src/pyclass.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ enum ClassItem {
1616
},
1717
}
1818

19-
fn meta_to_vec(meta: Meta) -> Result<Vec<NestedMeta>, Meta> {
19+
fn meta_to_vec(meta: Meta) -> Option<Vec<NestedMeta>> {
2020
match meta {
21-
Meta::Word(_) => Ok(Vec::new()),
22-
Meta::List(list) => Ok(list.nested.into_iter().collect()),
23-
Meta::NameValue(_) => Err(meta),
21+
Meta::Word(_) => Some(Vec::new()),
22+
Meta::List(list) => Some(list.nested.into_iter().collect()),
23+
Meta::NameValue(_) => None,
2424
}
2525
}
2626

0 commit comments

Comments
 (0)