pub fn consume_attribute(
    attrs: &mut Vec<syn::Attribute>,
    attr_to_consume: &syn::Attribute,
) -> bool {
    if let Some(i) = attrs.iter().position(|attr| attr == attr_to_consume) {
        attrs.remove(i);
        true
    } else {
        false
    }
}
/// Returns true on consumption of one attribute from `attrs` if it equals to `attr_to_consume`
Returns true on consumption of one attribute from `attrs` if it equals to `attr_to_consume`
Returns true on consumption of one attribute from ` attrs ` if it equals to ` attr_to_consume `
pub fn consume_attribute(
    attrs: &mut Vec<syn::Attribute>,
    attr_to_consume: &syn::Attribute,
) -> bool {
    if let Some(i) = attrs.iter().position(|attr| attr == attr_to_consume) {
        attrs.remove(i);
        true
    } else {
        false
    }
}
pub fn consume_attribute ( attrs : & mut Vec < syn :: Attribute > , attr_to_consume : & syn :: Attribute , ) -> bool { if let Some ( i ) = attrs . iter ( ) . position ( | attr | attr == attr_to_consume ) { attrs . remove ( i ) ; true } else { false } }
Returns true on consumption of one attribute from `attrs` if it equals to `attr_to_consume`
Returns true on consumption of one attribute from ` attrs ` if it equals to ` attr_to_consume `
attrs
&mut Vec<syn::Attribute>
attr_to_consume
&syn::Attribute
attrs
&mut Vec<syn::Attribute>
attr_to_consume
&syn::Attribute