(output: &ReturnType)
| 916 | } |
| 917 | |
| 918 | fn parse_output(output: &ReturnType) -> syn::Result<Type> { |
| 919 | match output { |
| 920 | ReturnType::Default => Ok(syn::parse_quote!(())), |
| 921 | ReturnType::Type(_, ty) => Ok((**ty).clone()), |
| 922 | } |
| 923 | } |
| 924 | |
| 925 | fn extract_attribute<'a>(attrs: &'a [Attribute], name: &str) -> Option<&'a Attribute> { |
| 926 | attrs.iter().find(|attr| attr.path().is_ident(name)) |