mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 11:14:38 +08:00
Fix sub-crate compilation
This commit is contained in:
1 parent
2c887905a1
commit
16644daffa
1 file changed
+4
-4
@@ -16,11 +16,11 @@ enum ClassItem {
|
||||
},
|
||||
}
|
||||
|
||||
fn meta_to_vec(meta: Meta) -> Result<Vec<NestedMeta>, Meta> {
|
||||
fn meta_to_vec(meta: Meta) -> Option<Vec<NestedMeta>> {
|
||||
match meta {
|
||||
Meta::Word(_) => Ok(Vec::new()),
|
||||
Meta::List(list) => Ok(list.nested.into_iter().collect()),
|
||||
Meta::NameValue(_) => Err(meta),
|
||||
Meta::Word(_) => Some(Vec::new()),
|
||||
Meta::List(list) => Some(list.nested.into_iter().collect()),
|
||||
Meta::NameValue(_) => None,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user