typhoon-context-macro 0.1.0-alpha.6

TODO
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use syn::visit_mut::VisitMut;

pub struct AttributeRemover(&'static str);

impl AttributeRemover {
    pub fn new(name: &'static str) -> Self {
        AttributeRemover(name)
    }
}

impl VisitMut for AttributeRemover {
    fn visit_attributes_mut(&mut self, i: &mut Vec<syn::Attribute>) {
        i.retain(|el| !el.path().is_ident(self.0));
    }
}