diff --git a/pyo3-derive-backend/src/method.rs b/pyo3-derive-backend/src/method.rs index 30fc837e..31e68b02 100644 --- a/pyo3-derive-backend/src/method.rs +++ b/pyo3-derive-backend/src/method.rs @@ -286,7 +286,7 @@ fn parse_attributes(attrs: &mut Vec) -> syn::Result<(FnType, Vec let mut res: Option = 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)