Merge pull request #626 from Alexander-N/unwrap

Remove unwrap for attribute parsing
This commit is contained in:
Yuji Kanagawa 2019-10-13 15:46:17 +09:00 committed by GitHub
commit 1796335617
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)