/// Helper to extract the parameters of an attribute. If the attribute is of the form
/// `n(a1, ..., an)`, this extracts the a_i as a vector. Otherwise the attribute is assumed
/// to have no parameters.
Helper to extract the parameters of an attribute. If the attribute is of the form
`n(a1, ..., an)`, this extracts the a_i as a vector. Otherwise the attribute is assumed
to have no parameters.
Helper to extract the parameters of an attribute . If the attribute is of the form ` n ( a1 ... an ) ` this extracts the a_i as a vector . Otherwise the attribute is assumed to have no parameters .
pub fn attr_params(attr: &Attribute) -> Vec<&Attribute> {
    match &attr.value {
        Attribute_::Parameterized(_, vs) => vs.value.iter().collect(),
        _ => vec![],
    }
}
pub fn attr_params ( attr : & Attribute ) -> Vec < & Attribute > { match & attr . value { Attribute_ :: Parameterized ( _ , vs ) => vs . value . iter ( ) . collect ( ) , _ => vec ! [ ] , } }
Helper to extract the parameters of an attribute.
Helper to extract the parameters of an attribute .
attr
&Attribute