Skip to content

Commit

Permalink
Fix slow units in convert-policy-json-to-cedar (#419)
Browse files Browse the repository at this point in the history
Signed-off-by: Shaobo He <[email protected]>
  • Loading branch information
shaobo-he-aws authored Sep 23, 2024
1 parent 59a5ede commit db4dc19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cedar-drt/fuzz/fuzz_targets/convert-policy-json-to-cedar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ enum ESTParseError {
}

fuzz_target!(|est_json_str: String| {
if let Ok(ast_from_est) = serde_json::from_str::<cedar_policy_core::est::Policy>(&est_json_str)
if let Ok(ast_from_est) = serde_json::from_str::<serde_json::Value>(&est_json_str)
.and_then(|val| serde_json::from_value::<cedar_policy_core::est::Policy>(val))
.map_err(ESTParseError::from)
.and_then(|est| {
est.try_into_ast_template(Some(PolicyID::from_string("policy0")))
Expand Down

0 comments on commit db4dc19

Please sign in to comment.