(ty: &syn::Type, wrapper: &str)
| 43 | } |
| 44 | |
| 45 | pub fn match_last_ty(ty: &syn::Type, wrapper: &str) -> bool { |
| 46 | match ty { |
| 47 | syn::Type::Path(ref p) => p |
| 48 | .path |
| 49 | .segments |
| 50 | .last() |
| 51 | .map(|seg| seg.ident == wrapper) |
| 52 | .unwrap_or(false), |
| 53 | _ => false, |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | pub fn last_inner_ty(ty: &syn::Type) -> Option<&syn::Type> { |
| 58 | if let syn::Type::Path(ref p) = ty { |
no outgoing calls
no test coverage detected