Merge pull request #626 from Alexander-N/unwrap
Remove unwrap for attribute parsing
This commit is contained in:
commit
1796335617
|
@ -286,7 +286,7 @@ fn parse_attributes(attrs: &mut Vec<syn::Attribute>) -> syn::Result<(FnType, Vec
|
|||
let mut res: Option<FnType> = None;
|
||||
|
||||
for attr in attrs.iter() {
|
||||
match attr.parse_meta().unwrap() {
|
||||
match attr.parse_meta()? {
|
||||
syn::Meta::Path(ref name) => {
|
||||
if name.is_ident("new") || name.is_ident("__new__") {
|
||||
res = Some(FnType::FnNew)
|
||||
|
|
Loading…
Reference in a new issue