Skip to content
5 changes: 5 additions & 0 deletions languages/rust/oso-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ fn get_nested_attr(nested: NestedMeta, oso_attrs: &mut Vec<OsoAttribute>) {
}

fn get_oso_attrs(attr: Attribute, oso_attrs: &mut Vec<OsoAttribute>) {
if let Some(ident) = attr.path.get_ident() {
if ident.to_string() != "polar" {
return ();
}
}
let meta = attr.parse_meta().unwrap();
if let Meta::List(list) = meta {
match get_single_segment(&list.path) {
Expand Down