mokuya 0.0.7

Generic procedural macro helpers for parsing, type analysis, and derive macro generation.
Documentation
1
2
3
4
5
6
7
8
9
10
use syn::{Type, TypePath};

pub fn is_vec(ty: &Type) -> bool {
    if let Type::Path(TypePath { path, .. }) = ty
        && let Some(segment) = path.segments.last()
    {
        return segment.ident == "Vec";
    }
    false
}