1 2 3 4 5 6 7 8 9 10
use syn::Type; pub fn is_outer_option(ty: &Type) -> bool { if let Type::Path(typepath) = ty { if let Some(segment) = typepath.path.segments.first() { return segment.ident == "Option"; } } false }