Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cdisselkoen committed Feb 16, 2024
1 parent 276fae9 commit 80eb655
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions cedar-policy-generators/src/policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ use crate::hierarchy::Hierarchy;
use crate::size_hint_utils::size_hint_for_ratio;
use arbitrary::{Arbitrary, Unstructured};
use cedar_policy_core::ast::{
Annotation, Annotations, AnyId, Effect, EntityUID, Expr, Name, Policy, PolicyID, PolicySet, StaticPolicy, Template,
Annotation, Annotations, AnyId, Effect, EntityUID, Expr, Name, Policy, PolicyID, PolicySet,
StaticPolicy, Template,
};
use cedar_policy_core::{ast, est};
use serde::Serialize;
Expand Down Expand Up @@ -123,12 +124,18 @@ impl GeneratedPolicy {
}
}

fn convert_annotations(
annotations: HashMap<AnyId, SmolStr>,
) -> Annotations {
fn convert_annotations(annotations: HashMap<AnyId, SmolStr>) -> Annotations {
annotations
.into_iter()
.map(|(k, v)| (k, Annotation { val: v.into(), loc: None }))
.map(|(k, v)| {
(
k,
Annotation {
val: v.into(),
loc: None,
},
)
})
.collect()
}

Expand Down

0 comments on commit 80eb655

Please sign in to comment.