/// Renames all attributes that have a specific `name` to the `target`.
Renames all attributes that have a specific `name` to the `target`.
Renames all attributes that have a specific ` name ` to the ` target ` .
pub fn rename_attributes(attributes: &mut Vec<Attribute>, name: &str, target: &str) {
    for attr in attributes {
        if attr.path.is_ident(name) {
            attr.path = Path::from(PathSegment::from(Ident::new(target, Span::call_site())));
        }
    }
}
pub fn rename_attributes ( attributes : & mut Vec < Attribute > , name : & str , target : & str ) { for attr in attributes { if attr . path . is_ident ( name ) { attr . path = Path :: from ( PathSegment :: from ( Ident :: new ( target , Span :: call_site ( ) ) ) ) ; } } }
Renames all attributes that have a specific `name` to the `target`.
Renames all attributes that have a specific ` name ` to the ` target ` .
attributes
&mut Vec<Attribute>
name
&str
target
&str